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
Unable to view RTF files in IE8
Create Mail Merge in Word from Public Folder in Outlook
logon problem
Software Inventory in SCCM 2007
VMWARE VMDK Guest Blue Screen
How can execute an application asynchronously in a trigger/stored procedure?
Virtual Server 2005 R2 'fatal error' when attempting to resume from saved state
c# installer for webservice
Why does Format([Del Date],"ww") give 53 weeks?
Not sure of what the numeric value would be for align left.