Subject | Re: RI using triggers - Another question |
---|---|
Author | Nols Smit |
Post date | 2006-04-06T12:07:41Z |
Thanks for the help. This is working fine:
/* Trigger body */
select first 1 ID from addresses where updater_id = old.id into Key_ID;
if (Key_ID is not null) then
Exception Code_ID 'Updater ID in use in table Addresses where ID = ' ||
Key_ID;
The text of the exception Code_ID is: "Code in use"
When the exception is raised, I get:
Exeption 1
Updater ID in use in table Addresses where ID = 1
Shouldn't I get:
Code in use
Updater ID in use in table Addresses where ID = 1
(Johannes ek kan twee uiters amusante e-posse vor jou aanstuur. Dis so
iewat stout, maar nou ja - dis mos die nuwe Suid Afrika. Laar weet met 'n
privaat e-pos)
Regards,
Nols Smit
Disclaimer Legal Notice:
By having opened and read this electronic mail, you are deemed to have
understood and accepted all disclaimers and conditions pertaining to
electronic mail emanating from, and received by The Council for Geoscience,
further detail of which may be viewed at the following hyperlink:
http://www.geoscience.org.za/disclaimer.htm
/* Trigger body */
select first 1 ID from addresses where updater_id = old.id into Key_ID;
if (Key_ID is not null) then
Exception Code_ID 'Updater ID in use in table Addresses where ID = ' ||
Key_ID;
The text of the exception Code_ID is: "Code in use"
When the exception is raised, I get:
Exeption 1
Updater ID in use in table Addresses where ID = 1
Shouldn't I get:
Code in use
Updater ID in use in table Addresses where ID = 1
(Johannes ek kan twee uiters amusante e-posse vor jou aanstuur. Dis so
iewat stout, maar nou ja - dis mos die nuwe Suid Afrika. Laar weet met 'n
privaat e-pos)
Regards,
Nols Smit
Disclaimer Legal Notice:
By having opened and read this electronic mail, you are deemed to have
understood and accepted all disclaimers and conditions pertaining to
electronic mail emanating from, and received by The Council for Geoscience,
further detail of which may be viewed at the following hyperlink:
http://www.geoscience.org.za/disclaimer.htm