Skip to Main Content

SQL Developer

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

declaration nvl2 function in pl/sql

874760Jul 13 2011 — edited Jul 14 2011
Hello,

I am a newbie on PL/SQL Programming. I can not execute the program.. The error message is : ORA-00904: "others": invalid identifier

I defined the others but I didn't do in a proper way I guess..I look forward to hearing your advise.

Thanks,

create or replace
procedure PROCEDURE3 AUTHID CURRENT_USER
AS
BEGIN
EXECUTE IMMEDIATE 'CREATE TABLE MARGIN_2 AS
SELECT NVL2(cbyc_oems.oem,cbyc_oems.oem,"others") AS OEM,
world.template_country,
world.template_region,
SUM(thisysales.top)
FROM( ( THISYSALES LEFT JOIN WORLD ON thisysales.country=world.code) LEFT JOIN
oem_cage_codes ON THISYSALES.MFG_CODE=oem_cage_codes.oem_cage_code) LEFT JOIN cbyc_oems ON oem_cage_codes.code=cbyc_oems.oem
GROUP BY
NVL2(cbyc_oems.oem,cbyc_oems.oem,"others").
world.template_country,
world.template_region';
end procedure3;
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 11 2011
Added on Jul 13 2011
4 comments
412 views