Query

  • Hi,

    How to select 1 from the values between 1 and 0?

    Sk Flag

    1 0

    1 1

    1 0

    1 1

    I want to select the value 1 if there is one, for sk = 1

    Thanks!!!

  • I guess I don't understand your question. It seems like, "select * from table where sk = 1" would be the answer.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • Or, would it be

    SELECT * FROM TABLE WHERE SK = 1 AND Flag = 1I'm confused too.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply