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
IBM X3200 with LSI RAID, slow disk performance in Hyper-V virtual machine ?
Exchange 2010: 530 5.7.1 Client was not authenticated
Capture arrow keystrokes in a TForm
acOLECreateLink
Error updating public folder with free-busy information on virtual machine exchange 2003
From excel 2003 to 2007 problem
How to zero or delete transactions of purchases, sales and inventory in Dynamics Great Plains
Best way to push out printers to domain users?
I have a select query that I would like to add string data to
VS2008 opens .aspx files in new IE window instead of Designer/Source Editor