Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 format Bit Column to display (1 and 0) , Sql 2008

Author  Topic 

riadeasleh
Starting Member

8 Posts

Posted - 2011-07-21 : 08:14:48
Is there any setting that I can use to make the bit column display the actual value (1 or 0) instead of (True Or False) when editing/displaying table data in Sql Server 2008


Sincerely yours

Riade

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2011-07-21 : 08:22:41
Use a case statement?
Depends on how you are displaying the data but it's a front end thing rathe than to do with the data.

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2011-07-21 : 08:29:55
Change the datatype to tinyint.



N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page

riadeasleh
Starting Member

8 Posts

Posted - 2011-07-21 : 09:14:47
I still want to store it as Bit datatype.
I thought there is an option in SQL 2008 to format the bit column to display 1 or 0 instead of true or false. Back in Sql 2000/2005 I was able to enter 1 or 0 for a bit column when editing the table data.

However in Sql 2008 it does not allow the entry of 1 or 0 for bit column, but it allows it through update statement ( strange) .


Thanks

Riade

Go to Top of Page
   

- Advertisement -