66chawger
asked on
SQL 2008 How to specify column name when using case statement
This should be simple... How to specify a column name "as ....." when using a case statement (in bold below).
COALESCE(T1.POSTCODE_FW, '') as 'Zip Code',
COALESCE(T1.VENDOR_SPECIAL TY_FW, '') as 'Vendor Specialty',
COALESCE(T1.VENDOR_TYPE_FW , '') as 'Vendor Type',
CASE
WHEN T1.SUPSTATUS_FW = '0' THEN ''
WHEN T1.SUPSTATUS_FW = '1' THEN 'YES'
ELSE ''
END,
COALESCE(CONVERT(varchar(1 0), T2.START_DATE_FW, 101), '') as 'Start Date',
COALESCE(CONVERT(varchar(1 0), T2.END_DATE_FW, 101), '') as 'End Date',
COALESCE(T1.POSTCODE_FW, '') as 'Zip Code',
COALESCE(T1.VENDOR_SPECIAL
COALESCE(T1.VENDOR_TYPE_FW
CASE
WHEN T1.SUPSTATUS_FW = '0' THEN ''
WHEN T1.SUPSTATUS_FW = '1' THEN 'YES'
ELSE ''
END,
COALESCE(CONVERT(varchar(1
COALESCE(CONVERT(varchar(1
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Awarded Aneesh half of the 500 as they were the first one to respond.
ASKER