Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need help in creating a trigger

 
Babar Qadri
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have created a trigger in ORACLE 10g Database. Below is the code



Im getting this warning.

Warning: Trigger created with compilation errors.

Please help. . .
Thanks.

[edited to disable smilies]
[ April 12, 2005: Message edited by: Jeanne Boyarsky ]
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have 3 Ms in COMMIT.
This might be the problem.
 
Babar Qadri
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for pointing out.
I have made the correction but still getting the same error.
Help me please.
 
Avi Abrami
Ranch Hand
Posts: 1141
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Babar,
The error message you are getting usually indicates a syntax error in your trigger definition (the CREATE TRIGGER statement you posted).

If you are using "SQL*Plus" to execute your code, then, immediately after executing the code, you can give the following command:

and it will display a list of the "compilation errors".

For your information, trigger definition syntax is described in the "Oracle 10g SQL Reference", which is available from:

http://tahiti.oracle.com

(You can also find documentation for "SQL*Plus" at that same Web site.)

Good Luck,
Avi.
 
Shailesh Chandra
Ranch Hand
Posts: 1082
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[I have written before Avi's Post]

What is the error you are getting ? run the command 'show error' after you compile the same.

shailesh
[ April 12, 2005: Message edited by: Shailesh Chandra ]
 
Babar Qadri
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ld.SEX

The above field is giving me problem in compiling the trigger. Dont know why. After omitting this the trigger compiled successfully, and now it is working.

Actually, I have a table with the same name as "SEX" in the same schema. Although I have one more table with the same name "STATUS", but ld.STATUS is not screwing me.

Any inputs are appreciated. Thanks for the help.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you sure you have this field "SEX" in both of your tables?? For me just double check.

Cant think any other.
 
Shailesh Chandra
Ranch Hand
Posts: 1082
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Babar,

having a table with same name of column should not cause problem, verify the point of adeel.

also if you can provide create table script for tables BKP_PERSONNEL and PERSONNEL, it would be more helpful.

I can test this by creating trigger at my end ,how ever your code of trigger is ok

Shailesh
 
Babar Qadri
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its really ridiculous. You are right.
Thanks for pointing it out.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic