Link to home
Start Free TrialLog in
Avatar of Tunkster
Tunkster

asked on

iif statement/derived field in SQL

I am using a report writer that queries SQL tables and I am trying to create a derived field. If a field w/in the table equals one value then give x result fior this derived field, if the field equals another then have the derived field give a diff. result, etc...
Is there a way to do that in SQL.

Thx.
ASKER CERTIFIED SOLUTION
Avatar of Kevin Hill
Kevin Hill
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Tunkster
Tunkster

ASKER

hmmm... I want to create a derived field - like a iif statement.
The Case scenario is more of a function that I can not define into a derived field per se...
I stand corrected:
case (BSOL9.dbo.TW70800.TW_User_Def_text_5)
when '8810' then '8810!'
else 'nope'
end

Worked... THX!