DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: is there an alternative to SQL NOT IN

  1. #1
    Join Date
    Feb 2005
    Posts
    7

    is there an alternative to SQL NOT IN

    are there any other ways to say, for example

    Where MemberNo NOT IN field
    Paul

  2. #2
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    not exists is similar

  3. #3
    Join Date
    May 2000
    Location
    ATLANTA, GA, USA
    Posts
    3,135
    Also, MINUS
    OUTER JOIN

    Tamil

  4. #4
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142

    Re: is there an alternative to SQL NOT IN

    Originally posted by pepsipaul
    Where MemberNo NOT IN field
    Are you sure NOT IN is what you want? The "code" you posted is not enough for me to distinguish between:
    1) Where INSTR(field, MemberNo) = 0 <- where MemberNo and field are from the same row
    2) Where MemberNo NOT IN (Select field From . . . )
    as possibly correct coding.


    Caution: NOT IN behaves non-intuitively (but logically) when the Select returns a NULL. Unless you've cracked that, NOT EXISTS is more likely to give the answer you expect.

  5. #5
    Join Date
    Apr 2003
    Posts
    353
    Size of the tables plays a major role in using the two.

    http://asktom.oracle.com/pls/ask/f?p...D:953229842074

Posting Permissions

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


Click Here to Expand Forum to Full Width