Home » RDBMS Server » Server Administration » Error - PL/SQL: ORA-00984
Error - PL/SQL: ORA-00984 [message #244876] Thu, 14 June 2007 07:26 Go to next message
gajini
Messages: 262
Registered: January 2006
Senior Member
Hi,

This is somewhat interesting,please clear this doubt,

My database(9.2.0.6) trigger contains the following insert statement in it,

INSERT INTO Document_execption ( c_id,
c_desc,
c_old_status,
c_new_status,
d_exception_date)
values (I.C_ID,
substr(sqlerrm,1,200)
:OLD.C_STATUS,
:NEW.C_STATUS,
SYSDATE);


This trigger is compiled successfully in oracle version 9.2.0.6.

But the same trigger in database version 9.2.0.8 gives the following error,

PL/SQL: ORA-00984: column not allowed here

It points to the column substr(sqlerrm,1,200),then i changed to it,

ERRMSG:=sqlerrm

INSERT INTO Document_execption ( c_id,
c_desc,
c_old_status,
c_new_status,
d_exception_date)
values (I.C_ID,
ERRMSG,
:OLD.C_STATUS,
:NEW.C_STATUS,
SYSDATE);


Then the trigger is compiled successfully.

What could be the reason for this error? Is this due to version difference or
i've to do anything so that i can use the same code as it is in 9.2.0.6 without
modifying anything in insert statement?

Thanks..


Re: Error - PL/SQL: ORA-00984 [message #244887 is a reply to message #244876] Thu, 14 June 2007 08:26 Go to previous messageGo to next message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
a "," is missing after "substr(sqlerrm,1,200)".

Regards
Michel
Re: Error - PL/SQL: ORA-00984 [message #244948 is a reply to message #244887] Thu, 14 June 2007 12:52 Go to previous messageGo to next message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
Talk about a good eye.
Re: Error - PL/SQL: ORA-00984 [message #244952 is a reply to message #244948] Thu, 14 June 2007 12:59 Go to previous messageGo to next message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Have been taken advantage of a good lesson. Cool

Regards
Michel
Re: Error - PL/SQL: ORA-00984 [message #245019 is a reply to message #244876] Fri, 15 June 2007 00:17 Go to previous messageGo to next message
gajini
Messages: 262
Registered: January 2006
Senior Member
Hi Michel,

Actually the comma is missed out while copy,pasting...

now tell what could be the reason for this..
Re: Error - PL/SQL: ORA-00984 [message #245046 is a reply to message #245019] Fri, 15 June 2007 01:20 Go to previous message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Post the real code and execution.

Regards
Michel
Previous Topic: Upgrade to 10g
Next Topic: Create DB in Linux server using a Window's DB template
Goto Forum:
  


Current Time: Mon Dec 02 12:32:06 CST 2024