|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
compilation errors in triggers for delete
Hi,can anyone please tell me what is wrong with these triggers....I get a 'Warning: Trigger created with compilation error' when i run my shell script. The other trrigers that I have written for insert work fine. The triggers are: create or replace trigger T_USER_ACT_CONFIG_delete before DELETE on T_SMISNODE for each row BEGIN DELETE from T_USER_ACT_CONFIG where Localid= ld.localid;END; / create or replace trigger T_CON_FAIL_CONFIG_delete before DELETE on T_SMISNODE for each row BEGIN DELETE from T_CON_FAIL_CONFIG where Localid= ld.localid;END; / create or replace trigger T_CON_FAIL_DETAILS_delete before DELETE on T_SMISNODE for each row BEGIN DELETE from T_CON_FAIL_DETAILS where Localid= ld.localid;END; / |
|
#2
|
|||
|
|||
|
Your triggers look fine and suppose to work, first create any of these trigger directly from SQL prompt just to make sure that there is no problem in your trigger, if it gives you any error, you can see where is the error by using 'show errors' command on sql prompt it gives you line number and some information that cause to generate error, for example
SQL>show errors |
|
#3
|
|||
|
|||
|
I think you probably want to refer to
ld.localid rather than id.localidAlso, you could look at ON DELETE CASCADE integrity constraints which would automatically delete entries from the child table when the parent table entry is deleted. |
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > compilation errors in triggers for delete |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|