将查询从Oracle迁移到SQL Server 2008

时间:2014-11-13 09:53:25

标签: sql-server oracle

select 
    eue.PERSONID,
    eue.EID,
    eue.NAME_COMPLETE,  eue.
    eue.EMAIL_ADDRESS_OFFICE as EMAIL 
from  
    HAIL_ESS_USERS_EXTENDED_V eue
where 
    eue.PERSONID = p_person_id) eue
join 
   (select *
    from HAIL_ESS_ROLE_MAP
    where ROLE_ID in (select ID
                      from HAIL_ESS_ROLES
                      where upper(ROLE_NAME) like upper('Rewards and Recognition%'))) b on   eue.PERSONID = b.PERSON_ID(+); 

有人可以告诉我(+)的含义吗?我必须将此查询从Oracle迁移到SQL Server 2008

2 个答案:

答案 0 :(得分:1)

SQL Server等效项 LEFT OUTER JOIN

select eue.PERSONID,
           eue.EID,
           eue.NAME_COMPLETE,  eue.
           eue.EMAIL_ADDRESS_OFFICE as EMAIL 
    from  HAIL_ESS_USERS_EXTENDED_V eue
                 where eue.PERSONID = p_person_id) eue
         left outer join (select *
                from    HAIL_ESS_ROLE_MAP
                where   ROLE_ID in (select  ID
                                    from    HAIL_ESS_ROLES
                                    where   upper(ROLE_NAME) like upper('Rewards and Recognition%')))b
          on   eue.PERSONID=b.PERSON_ID; 

答案 1 :(得分:0)

LEFT OUTER JOIN

的表示法