Q
Problem solve Get help with specific problems with your technologies, process and projects.

Converting SQL to inline view sentence

I have a sentence like this:
Select * from T1 where x in ( select y from T2 )

It is typically processed as:

select * 
  from t1, ( select distinct y from t2 ) t2
 where t1.x = t2.y;

But I have select * from T1 where x NOT IN (select y from T2)

How can I convert this SQL to an inline view sentence?

  
 select *
         from t1, (select x,y from t1, t2
           where t1.x = t2.y(+)) t3
           where t1.x = t3.x
           and t3.y is null

Dig Deeper on Using Oracle PL-SQL

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close