Microsoft
Software
Hardware
Network
Question : Need help with CASE statement
I have read CASE syntax, but I am still confuse. I want to write a CASE base on targetID as follow:
targetID = 1
FabricToSend="1 yard"
targetID = 2
FabricToSend = "2 yard"
i have no clue on how to start. :(
can someone guide me?
thanks
Answer : Need help with CASE statement
SELECT FabricToSend = CASE (TargetID) when 1 then '1 yard' when 2 then '2 Yard' else null end
or
SELECT FabricToSend = = CAST (TargetID as varchar)+ ' yard'
Random Solutions
Best way to export Distribution group names, users, and email addresses from Exchange 2003.
Report from Crosstab Query
Windows XP Logon - Logoff loop
How do I get rid of this security warning in Access 2007 (See Image)?
faster version of controltip to display tooltip text
Scrolling Issue With DataGridView & Wrapping Text
how to change sql query not to pull duplicates
Output the Month's Name?
Automated countdown in outlook calendar?
Fonts and MS Access Forms