Skip to Main Content

SQL & PL/SQL

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!

how do you troubleshoot instead of trigger?

LostInPermuationMar 25 2014 — edited Mar 28 2014

I got help from you guys on creating instead of triggers.  Thanks again! But what is happening now is everything transacts as you would expect, but the rows aren't being actually inserted.

This is what you all showed me:

CREATE OR REPLACE TRIGGER NVUM_FY.NRN_SV_BY_SITETYPE_II

   INSTEAD OF INSERT

   ON NVUM_FY.nrn_sv_by_sitetype_v

   FOR EACH ROW

BEGIN

   UPDATE NRIS_WBETTERS.nrn_sv_by_sitetype

      SET site_visits = :NEW.site_visits,

          site_visits_variance = :NEW.site_visits_variance,

          ROUND = :NEW.ROUND,

          SAMP_STRATUM = :NEW.SAMP_STRATUM,

          SAMPLEYEAR = :NEW.SAMPLEYEAR,

          NF_VISITS = :NEW.NF_VISITS,

          NF_VISITS_VARIANCE = :NEW.NF_VISITS_VARIANCE,

          SITE_VISITS_COEF_VAR = :NEW.SITE_VISITS_COEF_VAR,

          NF_VISITS_COEF_VAR = :NEW.NF_VISITS_COEF_VAR

    WHERE sv_cn = :NEW.sv_cn AND AFOREST_CODE = :NEW.AFOREST_CODE;

END;

/

SHOW ERRORS

COMMIT;

Again, when I run the inserts against the views, the script reports 100% success.  The view obviously shows no errors.

But the data is not being successfully updated to the target table.

Thoughts?  Options?  Suggestions?

Thanks!

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 25 2014
Added on Mar 25 2014
16 comments
761 views