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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display 0 as "No" and 1 as "Yes" in datagrid

Status
Not open for further replies.

mattbold

Programmer
Oct 5, 2001
45
0
0
GB
Hello,

I have a database table which for one of the fields stores a 0 to represent "no" and a 1 to represent "yes". Could anyone tell me how to make these 0's and 1's display as "No" and "Yes" respectively when i display the results of a query using this table in a datagrid?

Any help would be much appreciated!

Cheers,
matt
 
What they always tell me is to format it in the query prior to binding your grid. Maybe use the IIF().

Good Luck,
 

u have to implement what 3587 has said
u can try out this query
(select 'yes' as empid,name from employee where something is not null)union(select 'NO' as empid,name from employee where something is null)
hope this helps u
good luck
 
Cheers guys, i got the IIF() in the SQL working :)

- matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top