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

What to use for a Boolean data type with T-SQL

Status
Not open for further replies.

gcole

Programmer
Joined
Aug 2, 2000
Messages
390
Location
US
We need a true false field in a table. We used bit and int data types but the Query Analyzer isn't seeing the 0 and -1 values. We are using 7.0.
 
The bit datatype on SQL Server can hold the values 1, 0, or NULL.

Are you saying you bit field does not contain any of these values??

Rick.
 
I need a field to hold -1 (Boolean true) or 0 (Boolean false). It also needs to be recognized by sql.
 
Smallint. This is due to the stupid VB standard of -1 being true instead of 1 being true.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top