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
Error reading from SMTP host in SharePoint
Can't delete user profile of deleted domain account
Fragmented data file
How to completely hide columns in Access 2007
SQL Injection
Error in Virtual PC 2007 when trying to startup an XP machine
Spell Check in Access 2003 MDE
VBA command to open EMBEDDED OLE object - Word document
Filtering MS SQL cross-tab query
How do I change field's data type when previously set using Lookup Wizard?