1

我有一个 Oracle 数据库的查询,我通过 ODBC 使用 MS Access 访问它。

此查询不适用于访问我需要将其转换为标准 SQL,我尝试了几次都没有成功。我想知道是否可以帮助我谢谢!

   select t2.s_studentreference "Ad No"
        , t1.p_surname "Surname"
        , t1.p_forenames "Forenames"
        , t3.e_reference "Reference"
        , t3.e_name "Name" 
    from capd_a t2
       , capd_b t1
       , capd_c t3 
   where t2.s_id(+)=t1.p_id 
     and (t3.e_student=t1.p_id) 
     and (t3.e_reference='D /YR2A2/12') 
4

1 回答 1

3

如果standard SQL你的意思是ANSI SQL你的查询可能看起来像这样

   select t2.s_studentreference "Ad No"
        , t1.p_surname "Surname"
        , t1.p_forenames "Forenames"
        , t3.e_reference "Reference"
        , t3.e_name "Name" 
    from capd_b t1
   right outer join capd_a t2
      on (t2.s_id = t1.p_id)
    join capd_c t3 
      on ((t3.e_student=t1.p_id) and (t3.e_reference='D /YR2A2/12')) 
于 2012-09-21T07:46:36.823 回答