Can you use a case statement to designate multiple fields in a select clause?
For example:
Rather than having a Case for Each field.
I just can't seem to get the code syntax and Books Online doesn't seem to address this.
Thanks.
Tim
Tim Roop
"If you can do something about it, why waste time getting upset? If you can't do anything about it, why bother getting upset on top of it? -Shantideva
For example:
Code:
select employid,
case
when Plan_1 is not null
then (Plan_1_Beg_date, Plan_1_End_Date)
else Null, Null
end
Rather than having a Case for Each field.
Code:
select employid,
case
when Plan_1 is not null
then Plan_1_Beg_date
else Null
end,
case
when Plan_1 is not null
then Plan_1_End_Date
else Null
end
I just can't seem to get the code syntax and Books Online doesn't seem to address this.
Thanks.
Tim
Tim Roop
"If you can do something about it, why waste time getting upset? If you can't do anything about it, why bother getting upset on top of it? -Shantideva