July 29, 2002 at 5:19 am
I am trying to migrate Access SQL to T SQL.
I am migrating IIF staements using case statements .. I have encountered a problem in that some of the IIF clausew return a value from a column value as opposed to
a 1 or a zero T SQL doesn't seem to be allowing me to do this.
Any advice appreciated .
July 29, 2002 at 5:30 am
July 29, 2002 at 5:48 am
You can return any column value as a result from the case statement, just like you're doing constants now. For example,
Select col1, case when <some boolean condition>
then
col2
else
col3
end as <somename>, col4, ...
Jay
Jay Madren
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply