Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2004

    Unanswered: Querying a table but not all the data

    I need to query a table that has several different caller records but I only need the ones that are not= 9999 and 8888.

    How would I query the table.

  2. #2
    Join Date
    Sep 2002
    Provided Answers: 1
    This will work if you don't have or want records where the caller is null:

    select *
    from tablename
    where caller not in (9999,8888);

    If you do need to select nulls as well then:

    select *
    from tablename
    where (caller not in (9999,8888) or caller is null);

Posting Permissions

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