Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Convert ANSI query into old style

Shadow123Mar 17 2016 — edited Mar 17 2016

Hi Guys

I appreciate that if someone help me out, I don't have database at this moment so I'm wondering that I cannot provide create table script but I hope that  you don't need it.....

I have the following query with ANSI standard and now I want to convert it by using old format, I did try but now sure whether I wrote it correctly or not, please see below:

ANSI Query

SELECT pd.PARTICIPANT_OBJ_DETAIL_VALUE

FROM poi,

  ei,pd

LEFT OUTER JOIN pd

ON ((poi.EVENT_INSTANCE_ID     = pd.EVENT_INSTANCE_ID)

AND (poi.OBJECT_ID             = pd.OBJECT_ID)

AND (poi.START_TIME            = pd.START_TIME) )

WHERE poi.EVENT_INSTANCE_ID    = ei.EVENT_INSTANCE_ID

AND (poi.OBJECT_TYPE_CODE_ROLE = '1')

AND (poi.OBJECT_ID LIKE '%2.16.840.1.113883.3.239.22.3%')

AND (pd.PARTICIPANT_OBJ_DETAIL_TYPE = '44');

Converted Query

      

SELECT pd.PARTICIPANT_OBJ_DETAIL_VALUE

FROM poi,

  pd ,

  ei

WHERE poi.start_time      = pd.start_time(+)

AND poi.event_instance_id = pd.event_instance_id(+)

AND poi.OBJECT_ID         = pd.OBJECT_ID(+)

  ------------------

AND poi.EVENT_INSTANCE_ID      = ei.EVENT_INSTANCE_ID

AND (poi.OBJECT_TYPE_CODE_ROLE = '1')

AND (poi.object_id LIKE '%2.16.840.1.113883.3.239.22.3%')

AND (pd.PARTICIPANT_OBJ_DETAIL_TYPE = '44'

OR pd.PARTICIPANT_OBJ_DETAIL_TYPE  IS NULL );

Thanks in advance

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 14 2016
Added on Mar 17 2016
5 comments
1,321 views