MattConnell
New Member
- Joined
- Feb 23, 2011
- Messages
- 1
All,
Hope you can help here.
Excel 2010 using MS Query to run handcoded SQL to ruturn data from an ORACLE 11G DBMS.
I am trying to use a CASE statement but am confounded with a series of errors that I cannot figure out.
SELECT
GORIMMU.GORIMMU_PIDM,
GORIMMU.GORIMMU_IMMU_CODE,
CASE
WHEN
(GORIMMU.GORIMMU_IMMU_CODE = 'IMMU_PEND')
THEN 'Y'
ELSE 'N'
END AS 'IMMU_PEND_IND',
FROM GENERAL.GORIMMU GORIMMU
This is what I want to run, however every time I do I get some permutation of the "Didnt expect XX after the select column list" where XX is either WHERE or ( or GORIMMU (if i remove the parenthesis from the logic statement)
Any assistance here.....rather new at this so I'm los here.
Matt.
Hope you can help here.
Excel 2010 using MS Query to run handcoded SQL to ruturn data from an ORACLE 11G DBMS.
I am trying to use a CASE statement but am confounded with a series of errors that I cannot figure out.
SELECT
GORIMMU.GORIMMU_PIDM,
GORIMMU.GORIMMU_IMMU_CODE,
CASE
WHEN
(GORIMMU.GORIMMU_IMMU_CODE = 'IMMU_PEND')
THEN 'Y'
ELSE 'N'
END AS 'IMMU_PEND_IND',
FROM GENERAL.GORIMMU GORIMMU
This is what I want to run, however every time I do I get some permutation of the "Didnt expect XX after the select column list" where XX is either WHERE or ( or GORIMMU (if i remove the parenthesis from the logic statement)
Any assistance here.....rather new at this so I'm los here.
Matt.