Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> SQL works in 10g, not in 8i
This SQL works fine in 10g, but no in 8i.
It stops at the subquery highlighting the SUM word, with the error: NOT
a Group Expression.
What is wrong with it. How should I change it.
Spent a few hours on it, and still can't figure it out.
The rest of the query is fine. If I replace the subquery by 1,
everything is okay.
The subquery by itself is also ok.
Can you help?
Thanks
Roberto
Select AS_OF_DATE, b.CD_ID,DEALNO ,SECID,
(PREM_DISC_AMOUNT/((EST_MDATE
-START_AMORT_DATE)+1)*((TO_DATE('31-jan-2005')+1)-START_AMORT_DATE)
-PREM_DISC_AMOUNT)
+ (SELECT sum(A.UNAMORT_PREM_DISC_BAL) FROM FASDIG.CALLABLE_DEAL A
WHERE A.AS_OF_DATE = ADD_MONTHS('30-sep-2005',-2) AND A.SECID LIKE
b.secid)
AS "AMORTIZATION CHECK"
FROM FASDIG.CALLABLE_DEAL B
WHERE AS_OF_DATE = '31-jan-2005' AND HEDGED_FLAG='Y' AND
PREM_DISC_AMOUNT <>0 AND PREM_DISC_IND ='D'
GROUP BY
AS_OF_DATE, CD_ID, DEALNO , SECID, PREM_DISC_AMOUNT, EST_MDATE,
START_AMORT_DATE
![]() |
![]() |