tonyweis138
Programmer
I am trying to run the following query and it is telling me that i have an invalid token comma. Any ideas?
select *, CASE WHEN UBILOP = 'SHP' THEN '' ELSE USHACT END AS BILLTO,
CASE WHEN USHVIA = '04' THEN 1 ELSE 0 END AS SAT,
CASE UPAYTM WHEN '05' THEN 2
WHEN '08' THEN 2
WHEN '04' THEN 1
ELSE 0 END AS CODTYPE,
CASE USHVIA WHEN '0' THEN 'C'
WHEN '01' THEN 'S'
WHEN '02' THEN 'G'
WHEN '03' THEN 'H'
ELSE 'S'
END AS SERVICE from UPSIMP00 where UORDNO = @input
select *, CASE WHEN UBILOP = 'SHP' THEN '' ELSE USHACT END AS BILLTO,
CASE WHEN USHVIA = '04' THEN 1 ELSE 0 END AS SAT,
CASE UPAYTM WHEN '05' THEN 2
WHEN '08' THEN 2
WHEN '04' THEN 1
ELSE 0 END AS CODTYPE,
CASE USHVIA WHEN '0' THEN 'C'
WHEN '01' THEN 'S'
WHEN '02' THEN 'G'
WHEN '03' THEN 'H'
ELSE 'S'
END AS SERVICE from UPSIMP00 where UORDNO = @input