I can't seem to find any references to help me on this, although the list that was posted in the last newbie SQL question was quite helpful. Anyhoo.
Using SQL 7, I have a table with a bit field, and I want to return a column in a view that has text based on that bit. So, any ideas why can't I do this:
Select
If (table.bit = 1)
'foo'
Else
'bar'
As mytext
From table
with my expectation being
table.bit
---------
1
1
0
1
0
returning
mytext
------
foo
foo
bar
foo
bar
Using SQL 7, I have a table with a bit field, and I want to return a column in a view that has text based on that bit. So, any ideas why can't I do this:
Select
If (table.bit = 1)
'foo'
Else
'bar'
As mytext
From table
with my expectation being
table.bit
---------
1
1
0
1
0
returning
mytext
------
foo
foo
bar
foo
bar