Results 1 to 3 of 3

Thread: Prior Omit

  1. #1
    Join Date
    Apr 2006
    Posts
    16

    Unanswered: Prior Omit

    Hello, Is there a way to do a prior omit in a SELECT?

    I currently have multiple selections separated by a GO, but I need to prior Omit the rows I selected prior

    so I have

    select * from mytabe where
    Address <> ' ' and
    Zip4 <> ' ' and
    zip in ('12345')
    Go

    select * from mytabe where
    Address <> ' ' and
    Zip4 <> ' ' and
    Purchcode in ('A','C')
    Go

    This continues for another 10 selections I need to constantly omit the selections made above.

    Is there a way to do this in SQL?



    Thanks!

  2. #2
    Join Date
    Jan 2004
    Location
    In a large office with bad lighting
    Posts
    1,040
    Why don't you put the pk in a temp table and use a "not in" subquery?

    -- This is all just a Figment of my Imagination --

  3. #3
    Join Date
    Apr 2006
    Posts
    16
    Quote Originally Posted by tomh53
    Why don't you put the pk in a temp table and use a "not in" subquery?

    how would I have to do that? when putting it in a temp table and using "not in", do I have to create a join?

Posting Permissions

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