Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312

    Unanswered: IN Operator Equivalent

    Is there an equivalent to Access' IN operator in SQL Server? I am used to using IN for a list of noncontigous records. Example:

    SELECT * FROM Table WHERE ID IN (1,3,5,6,9,10)

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Well yes - IN It is ANSI. In any case, IN is just short for using a whole load of ORs.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  3. #3
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Also - depending on what you are doing have a read of this and see if it applies:
    http://weblogs.sqlteam.com/jeffs/arc...2/10/9002.aspx
    Testimonial:
    pootle flump
    ur codings are working excelent.

  4. #4
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312
    Sorry, glorified syntax error. Seems to be working now.

Posting Permissions

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