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!

ascii sql syntax

elmasduroMay 30 2014 — edited Jun 2 2014

hi everyone,

i am trying to learn the ASCII SQL syntax in oracle database.  i think it is less code and easier to maintain.

i have the following query joining multiple tables and i want to rewrite using ascii sql (left outer join, inner join etc).

select tb.*

from ( select * from tb where cdate=sysdate and cid=44 and ( glcd in ('ab','cd') or ada_cd in ('gh','gr') ) )tb,

        (  select * from pb where cdate=sysdate and cid=44) pb,

         (  select * from org where cdate=sysdate and cid=44 and ddate=sysdate -1) f,

       (  select * from prod where cdate=sysdate and cid=44) pr,

       (  select * from dc where cdate=sysdate and cid=44 and ddate=sysdate -1) dc1,

       (  select * from prod where cdate=sysdate and cid=44) pr2,

       (  select * from dc where cdate=sysdate and cid=44 and ddate=sysdate -1) dc2

where tb.id = pb.id

and tb.cd = f.cd(+)

and pb.prod_id = to_char(pr.prod_id)(+)

and pr.iss_id = dc1.iss_id(+)

and pb.cid = to_char(pr2.prod_id)(+)

and pr2.iss_id = dc2.iss_id(+)

how can i rewrite the above query usins the ascii sql syntax using left out join on ... etc etc.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 30 2014
Added on May 30 2014
6 comments
2,740 views