dvader0571
Programmer
Is the CASE statement supported or not in 9i? I keep getting a "Missing right parenthesis" error when trying to run this. I thought CASE was ANSI SQL and thus supported....
SELECT SRVCHGKEY, SRVCHG, ACCTTYPE, BLTYPEKEY, BLITEMGRP, EFFDATE, EXPDATE, PRNORDER, CALCORDER, PRNTTEXT, REFTEXT, FVALKEY, BLITEMRATE, FPNLTYKEY, FINTKEY, DEPOSIT, DISCOUNT, PRNCPAYORD,
(CASE WHEN BGTNOOFLAG = 'Y' AND (SELECT BGTNO FROM imsv7.ACCTCHG WHERE ACCHGKEY = 1) IS NOT NULL
THEN (SELECT BGTNO FROM imsv7.ACCTCHG WHERE ACCHGKEY = 1) ELSE PRNCCBGTNO END) As PRNCCBGTNO,
PRNCPBGTNO, PENPAYORD, PENCBGTNO, PENPBGTNO, ARNGFLAG, DUNEXEMPT, DONATION, PENEXEMPT, BGTNOOFLAG
FROM imsv7.SRVCHGSU
WHERE SRVCHGKEY = 1;
SELECT SRVCHGKEY, SRVCHG, ACCTTYPE, BLTYPEKEY, BLITEMGRP, EFFDATE, EXPDATE, PRNORDER, CALCORDER, PRNTTEXT, REFTEXT, FVALKEY, BLITEMRATE, FPNLTYKEY, FINTKEY, DEPOSIT, DISCOUNT, PRNCPAYORD,
(CASE WHEN BGTNOOFLAG = 'Y' AND (SELECT BGTNO FROM imsv7.ACCTCHG WHERE ACCHGKEY = 1) IS NOT NULL
THEN (SELECT BGTNO FROM imsv7.ACCTCHG WHERE ACCHGKEY = 1) ELSE PRNCCBGTNO END) As PRNCCBGTNO,
PRNCPBGTNO, PENPAYORD, PENCBGTNO, PENPBGTNO, ARNGFLAG, DUNEXEMPT, DONATION, PENEXEMPT, BGTNOOFLAG
FROM imsv7.SRVCHGSU
WHERE SRVCHGKEY = 1;