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
Microsoft SQL Server Cluster - Currently only uses port 1815, can 1433 be enabled?
How to import table from Oracle DB with ODBC ?
BootMGR Is missing
Custom indexing on sub folders
VS 2005 vs 2003 - Backwards Compatible ?
Quicker way of adding computers/users to OU?
Populate Textbox with all query returns on a field
Selected collating sequence not supported
gpedit.msc not found in Windows 7 Home Premium
JET SQL - Merging fields from two tables into one, skipping duplicates