Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2004
    Posts
    69

    Unanswered: ANSI to THETA conversion

    I have the following query in ANSI syntax (executed in SQL Server)

    select * from table1 inner join table2 on table1.col1=table2.col1
    left join table3 on table3.col1=table2.col1
    and table1.col2='sa'
    and ((table3.col2 >= table2.col2) or table1.col2 is null)


    Can someone help me with THETA syntax equivalent for this query (for Oracle 8) ?

  2. #2
    Join Date
    Apr 2004
    Posts
    69
    Here is my understanding of how the query will be executed in SQL Server :

    1. Select all rows in table1 and table2 where table1.col1 is equal to table2.col2 (the number of rows returned by this will be there in the final result set)

    2. With this result set outer join table3 and the data to be appended from table3 in Result set will be dependent on execution of the the join and the other and/or conditions.

    Is this understanding right ?

    If the above is right, is it correct to convert the query as

    select * from table1, table2,
    (select table3* from table1,table2,table3 where <specify all the and conditions>) table3
    where table1.col1=table2.col1(+)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •