Results 1 to 5 of 5

Thread: query prob

  1. #1
    Join Date
    Feb 2004
    Location
    New York
    Posts
    45

    Unanswered: query prob

    Hello

    I would have to aske for help...

    I have a table A

    id type tid
    4 5 1
    4 v
    4 v
    4 b
    5 b
    5 v
    6 5 2
    6 v
    6 b
    7 v
    7 b

    I need to return a list a ids and its data that don't have a
    type 5 assoc. with that id.


    Thank you

  2. #2
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    select * from a where type <> '5';
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  3. #3
    Join Date
    Feb 2004
    Location
    New York
    Posts
    45
    Quote Originally Posted by beilstwh
    select * from a where type <> '5';

    Thank you, but unfort, its not the way I would need it.

    I need to see only id 5 and id 7?

    Please any more suggestions???

  4. #4
    Join Date
    Aug 2004
    Posts
    330
    select *
    from a
    where id not in(
    select id
    from a
    where type = '5'
    )
    Last edited by urquel; 09-28-04 at 16:16.

  5. #5
    Join Date
    Feb 2004
    Location
    New York
    Posts
    45

    Thumbs up

    Quote Originally Posted by urquel
    select *
    from a
    where id not in(
    select id
    from a
    where type = '5'
    )


    it did worked fine, thank you.

Posting Permissions

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