D
DaBlue
Guest
I'm trying to do a case statement in 4GL that can have two columns defining the output.
SELECT
"PERSON"."First",
"PERSON"."Last",
"PERSON"."EmpCode" as EmployeeCode,
CASE "PERSON"."Building"
WHEN '111' then 'HQ'
WHEN '222' then 'OPS'
WHEN '111' AND "PERSON"."EmpCode" = 'CCLASS' then 'MGMT'
END as Location
FROM ....
The compound case is throwing a syntax error when I run the query. I know I can do this in MSSQL... I assume I can for 4GL as well?
Any thoughts on how this is accomplished in 4GL?
Continue reading...
SELECT
"PERSON"."First",
"PERSON"."Last",
"PERSON"."EmpCode" as EmployeeCode,
CASE "PERSON"."Building"
WHEN '111' then 'HQ'
WHEN '222' then 'OPS'
WHEN '111' AND "PERSON"."EmpCode" = 'CCLASS' then 'MGMT'
END as Location
FROM ....
The compound case is throwing a syntax error when I run the query. I know I can do this in MSSQL... I assume I can for 4GL as well?
Any thoughts on how this is accomplished in 4GL?
Continue reading...