none
how to select a row that doesnt have a specific value

    คำถาม

  • HI I have a table in which I have a forgeign key  ClientiD  and there is another bit column current.

    There could be multiple record with the client ID and only 1 could have current =1 . but not all clients will have current=1.

    how i select the clientID for which there is current=0

    For example

    In the below table I want to get the  clients that does not have currrent=1 . I have client id 23 and client id 24. that doesnt have current =1. how i write tsql to bring up 23 and 24.

    RecID   ClientID   current

    1           23             0

    2           23             0

    3          23              0

    4          18              1

    5          18              0

    6          18              0

    7           24             1

    8          24             0

    9          24              0

    10        25             0

    11        25             0


    i am a novice and a student

    7 มีนาคม 2555 1:00

คำตอบ

ตอบทั้งหมด