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!

the MINUS operator in SQL

696393Feb 11 2011 — edited Feb 11 2011
Hi
i use this minus operator to find the non matching row of the second query.

after looking at the reasult of this query , i searched the one result in the second query alone i could see the data.

it's worng The MINUS query returns all rows in the first query that are not returned in the second query.

in my case it's returning the rows which returned by the second query.
  
(select distinct lower(trim(to_char(sso))),lower(trim(to_char(region))),to_date(expiration_date,'DD-MM-YY') from ca_ourc_view
where rownum <1001
)
minus
(select distinct lower(trim(to_char(sso))),lower(trim(to_char(region))),to_date(expiration_date,'DD-MM-YY') from ourc_members_v1@gesprd
where rownum <1001
 )
thanks


Raj
This post has been answered by 824405 on Feb 11 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 11 2011
Added on Feb 11 2011
3 comments
154 views