February 18, 2004 at 4:17 pm
I know that there is not a boolean datatype but instead a bit type. But is there a way to create SQL statements testing for True and False instead of 1 and 0?
February 18, 2004 at 4:57 pm
February 19, 2004 at 6:50 am
I'm more interested in something like:
"select * from Funds where IsLive = True"
where IsLive is a bit field.
February 19, 2004 at 7:14 am
You cannot use the words True/False as they are reserved words in SQL. The nearest you can get to your requirement is to check against character representation of True/False
select * from Funds
where (CASE WHEN ISNULL(IsLive,0) = 1 THEN 'True' ELSE 'False' END)= 'True'
Far away is close at hand in the images of elsewhere.
Anon.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply