Printing "Yes" /"No" from sql 0/1?
Database
2
Posts
2
Posters
0
Views
1
Watching
-
I want to display "Yes" if the field value is 0 and "No" if the field value is 1 and "None" if field value is anything else in DataGrid. Where the datatype of field value is int in sql server database. How to convert it in the desired way. Thnx in Advance
-
I want to display "Yes" if the field value is 0 and "No" if the field value is 1 and "None" if field value is anything else in DataGrid. Where the datatype of field value is int in sql server database. How to convert it in the desired way. Thnx in Advance
use the bit datatype. The only values for bit are 1 and 0. To convert
case when bitfield = 1 then 'yes' else 'no end
"People who never make mistakes, never do anything." My Blog