Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outputting BIT datatypes as a word? 1

Status
Not open for further replies.

DSect

Programmer
Sep 3, 2001
191
US
Hello -

Is there an easy way to do a T-SQL SELECT statement and have the results return the word "YES" for 1 and "NO" for 0 for a BIT datatype column?

REPLACE can do one part of it, I think.. But, I'm not sure of how to do it for YES and NO.

Sample data:
------------------
1
0
0
1
0

Sample output:
------------------
YES
NO
NO
YES
NO




Thanks!

I'm just trying to save myself from doing some stuff @ runtime.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top