AFTER INSERT OR UPDATE TRIGGER the insert not working

The update works but the insert is not working. I have two version that I have tried. I amd executing the inserts/update from Oracle Applications and the table row is either being inserted or updated correctly.
DROP TRIGGER APPS.CCC_HZ_ORG_CONTACTS_ARU;
CREATE OR REPLACE TRIGGER APPS.CCC_HZ_ORG_CONTACTS_ARU
/* --Created By: SKELLEHER
--Creation Date: 07/15/09
--Last Updated By:
--Last Update Date:  
AFTER INSERT OR UPDATE OF department, job_title
ON apps.hz_org_contacts
FOR EACH ROW
WHEN (
NEW.department <> OLD.department OR
NEW.job_title <> OLD.job_title
DECLARE
v_ChangeType VARCHAR2(10);
BEGIN
/* Use 'I' for Insert, 'U'' for Update, and'D' for delete(not part of app at this time). */
IF INSERTING THEN
v_ChangeType := 'INSERT';
ELSIF UPDATING THEN
v_ChangeType := 'UPDATE';
ELSE
v_ChangeType := 'DELETE';
END IF;
INSERT INTO cust.ccc_tca_po_tf_event_tbl
VALUES (ccc_tca_po_tf_event_tbl_s.NEXTVAL
, 'hz_org_contacts'
, v_ChangeType
, 'org_contact_id'
, :NEW.org_contact_id
, 'PENDING'
, NULL
, 0
, 'N'
, 'Y'
, :NEW.LAST_UPDATED_BY
, :NEW.LAST_UPDATE_DATE
, -1
, SYSDATE
, 'DEPARTMENT_JOBTITLE_UPDATE'
,'LDAP'
END;
AND I TRIED ANOTHER VERSION:

I have simplified it so it's just checking for insert but it's not picking up. Is the syntax IF INSERTING correct?
CREATE OR REPLACE TRIGGER APPS.CCC_HZ_ORG_CONTACTS_ARU
AFTER INSERT OR UPDATE
ON ar.hz_org_contacts
FOR EACH ROW
DECLARE
BEGIN
IF INSERTING THEN
INSERT INTO cust.ccc_tca_po_tf_event_tbl
VALUES (ccc_tca_po_tf_event_tbl_s.NEXTVAL
, 'hz_org_contacts'
, 'UPDATE'
, 'org_contact_id'
, :NEW.org_contact_id
, 'PENDING'
, NULL
, 0
, 'N'
, 'Y'
, :NEW.LAST_UPDATED_BY
, :NEW.LAST_UPDATE_DATE
, -1
, SYSDATE
, 'DEPARTMENT_JOBTITLE_UPDATE'
,'LDAP'
END IF;
END;
/

Similar Messages

  • My iPhone crashing after latest IOS Update. Screen is not working anymore. I cannot use buttons, the screen is freezing up.Only thing I am able, is to 'restart' the phone. Now it does it after 5 minutes itself! Already removed en reset phone, no success!

    My iPhone crashing after latest IOS Update. Screen is not working anymore. I cannot use buttons, the screen is freezing up.Only thing I am able, is to 'restart' the phone. Now it does it after 5 minutes itself! Already removed en reset phone, no success!
    Can anyone help me?

    Hi there Cinthia88,
    I would recommend taking a look at the troubleshooting steps found in the article below.
    iOS: Not responding or does not turn on
    http://support.apple.com/kb/ts3281
    -Griff W.

  • After 8.3 update my keyboard is not working at all?

    After the update 8.3 I am no longer able to use my keyboard?

    Hello Nurswanab,
    Thanks for using Apple Support Communities.
    I'm not sure if your onscreen keyboard is not working in all apps, or in a specific app, but to start troubleshooting please restart, and then reset your iPhone.  If this does not resolve the issue, please let me know, and provide more information about the issue.
    Restart or reset your iPhone, iPad, or iPod touch - Apple Support
    Have a good one,
    Alex H.

  • After Quick Time update .mov files will not work in Premier pro.

    I have windows 7 and the latest premiere pro. I uninstalled quick time still not working. Other files work fine however I work with a great deal of transparent background videos and now they will not work in Adobe apps. I have looked into solutions but cant find anything for windows. Please point me in the right direction.

    If its not working roll back QT.

  • Personas not working after latest FF update and "solution" is not working

    I am still unable to get my favorite personas to rotate. I'm upset that personas used to work quite nicely even though I had it set to clear history every time firefox was closed. I want personas to rotate AND have history cleared again. In the meantime, I've disabled clearing history--now how do I get the rotator working again please.

    Personas should work if you aren't in Private Browsing mode.
    Make sure that you do not run Firefox in (permanent) Private Browsing mode.
    *https://support.mozilla.org/kb/Private+Browsing
    *Tools > Options > Privacy > Firefox will: "Use custom settings for history"
    *Deselect: [ ] "Always use private browsing mode"
    When you are in Private Browsing mode then the persona is disabled (bug 852295) and you get the default theme and a purple PB icon in the Firefox menu button or the right end side of the menu bar (tab bar on Linux) and "(Private Browsing)" appended to the title bar.

  • Can we use both INSERT and UPDATE at the same time in JDBC Receiver

    Hi All,
    I would like to know is it possible to use both INSERT and UPDATE at the same time in one interface because I have a requirement in which I have to perform both the task.
    user send the file which contains both new and old record and I need to save those in MS SQL database.
    If the record exist then use UPDATE otherwise use INSERT.
    I looked on sdn but didn't find any blog which perform both the things at the same time.
    Interface Requirement
    FILE -
    > PI -
    > JDBC(INSERT & UPDATE)
    I am thinking to use JDBC Lookup but not sure if it good to use for bulk record.
    Can somebody please suggest me something or send me the link of any blog or anything to solve this problem.
    Thanks,

    Hi ,
              If I have understood properly the scenario properly,you are not performing insert and update together. As you posted
    "If the record exist then use UPDATE otherwise use INSERT."
    Thus you are performing either an insert or an update which depends on outcome of a search if the records already exist in database or not. Obviously to search the tables you need " select * from ...  where ...." query. If your query returns some results you proceed with update since this means there are some old records already in database. If your query returns no rows  you proceed with "insert into tablename....." since there are no old records present in database.
      Now perhaps the best method to do the searching, taking a decision to insert or update, and finally insert or update operation is to be done by a stored procedure in MS SQL database.  A stored procedure is a subroutine available to applications accessing a relational database system. Here the application is PI server.   If you need further help on how to write and call stored procedure in MS SQL you can look into these links
    http://www.daniweb.com/web-development/databases/ms-sql/threads/146829
    http://www.sqlteam.com/article/stored-procedures-parameters-inserts-and-updates
    [ This part you can ignore, Since its not sure that you will face this situation
        Still you might face some problems while your scenario runs. Lets consider this scenario, after the stored procedure searches the database it found no rows. Thus you proceed with an insert operation. If your database table is being accessed by multiple applications (or users) other than yours then it is very well possible that after the search operation completed with a null result, an insert/update operation has been performed by some other application with the same primary key. Now when you are trying to insert another row with same primary key you get an error message like "duplicate entry not possible for same primary key value". Thus you need to be careful in this respect. MS SQL has a feature called "exclusive locks ". Look into these links for more details on the subject
    http://msdn.microsoft.com/en-us/library/aa213039(v=sql.80).aspx
    http://www.mssqlcity.com/Articles/Adm/SQL70Locks.htm
    http://www.faqs.org/docs/ppbook/r27479.htm
    http://msdn.microsoft.com/en-US/library/ms187373.aspx
    http://msdn.microsoft.com/en-US/library/ms173763.aspx
    http://msdn.microsoft.com/en-us/library/e7z8d5hf(v=vs.80).aspx
    http://mssqlserver.wordpress.com/2006/11/08/locks-in-sql/
    http://www.mollerus.net/tom/blog/2008/03/using_mssqls_nolock_for_faster_queries.html
        There must be other methods to avoid this problem. But the point is you need to be sure that all access to database for insert/update operations are isolated.
    regards
    Anupam

  • How can you create a simple insert or update trigger

    I am trying to create a simple insert or update trigger to timestamp an xml document when I load it into my XML DB repository but I always get an error trying to compile the trigger.
    "ORA-25003: cannot change NEW values for this column type in trigger"
    Here is my PL/SQL:
    CREATE OR REPLACE TRIGGER "PLCSYSADM"."PLCSYSLOG_TIMESTAMP"
    BEFORE
    INSERT
    OR UPDATE ON "PLCSYSADM"."PLCSYSLOG"
    FOR EACH ROW BEGIN
    :new.sys_nc_rowinfo$ := xmltype('<datestamp>' || SYSDATE || '</datestamp>');
    END;
    Does anyone have an example that works ?
    Thanks in advance
    Niels Montanana

    http://developer.apple.com/referencelibrary/HardwareDrivers/idxUSB-date.html

  • I have an Iphone 4 16gb and updated the IOS 6.1.2. after the update my 3G is not working at all??. can you please suggest what can be done to rectify this problem?

    i have an Iphone 4 16gb and updated the IOS 6.1.2. after the update my 3G is not working at all??. can you please suggest what can be done to rectify this problem?

    I have the same problem.  After updating to 6.1.2 my iPad 3,2 will not find Verizon network.  It just says "Searching..." for ever.  Any thoughts?

  • My iPad2 is not working after an unsuccessful update to the new iOS6. How do I get working?

    My iPad2 is not working after an unsuccessful update to the new iOS6. How do I get working?

    - Try resetting the iPod. Nothing will be lost.
    Reset iPod touch:  Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Download/install a new app
    - Restore from backup
    - Restore to factory daults/new iPod.

  • After the OS 6 update my speaker does not work. My music plays but no sound comes out. Can someone help me with this issue? I currently have the 4S.

    After the OS 6 update my speaker does not work. Volume control on the side does not adjust the volume either. My music plays but no sound comes out. Can someone help me with this issue? I've tried rebooting my phone but still no sound comes out. I currently have the 4S.

    try to activate and desactivate the airplne switch a couple of time

  • After update.. i can not start the ipad, when i press agree in the terms ...it will freeze and the screen not working///help please

    after update.. i can not start the ipad, when i press agree in the terms ...it will freeze and the screen not working///help please

    What to Do When Your iPad Won't Turn On
    http://ipad.about.com/od/iPad_Troubleshooting/ss/What-To-Do-When-Your-Ipad-Wo-No t-Turn-On.htm
    iOS: Not responding or does not turn on
    http://support.apple.com/kb/TS3281
    iPad Frozen? How to Force Quit an App, Reset or Restart Your iPad
    http://ipadacademy.com/2010/11/ipad-frozen-how-to-force-quit-an-app-reset-or-res tart-your-ipad
    iPad: Basic troubleshooting
    http://support.apple.com/kb/TS3274
    iOS: Resolving update and restore alert messages
    http://support.apple.com/kb/TS1275
    iPad: Unable to update or restore
    http://support.apple.com/kb/ht4097
     Cheers, Tom

  • After the update my earbuds will not work for my music BUT will work fine for phone conversations

    After the update my earbud will not work for music BUT will work for phone conversations

    this might sound dumb but how do i do that because that is probably the problem

  • I have windows 7 and my speakers worked then after update my speakers do not work and everything checked out and says they are working and that soundcard is working but no sound now.

    I have windows 7 and my speakers worked then after update my speakers do not work and everything checked out and says they are working and that soundcard is working but no sound now.
    I have tried everything and nothing works.

    sound problems:
    #Restore speaker icon to System Task bar, right-click on clock or tray > Properties > Volume: On
    #Click on the Sound icon in System tray then on Mixer, make sure Firefox is not muted [http://dmcritchie.mvps.org/icons/fx_sound.png picture]
    <p>Additional references
    * [https://support.mozilla.com/en-US/kb/No%20sound%20in%20Firefox No sound in Firefox | Troubleshooting | Firefox Help]
    * [http://support.mozilla.com/en-US/kb/Video%20or%20audio%20does%20not%20play Video or audio does not play | Troubleshooting | Firefox Help]
    * [http://kb.mozillazine.org/Video_or_audio_does_not_play Video or audio does not play - MozillaZine Knowledge Base]

  • Hi pls help me my iphone is forest i update but  after my iphone is  devices open is not working i click but sim card installed , attempting to activate this one coming pls help me answer me

    hi pls help me my iphone is forest i update but  after my iphone is  devices open is not working i click but sim card installed , attempting to activate this one coming pls help me answer me

    Sounds like your phone was hacked to use with your carrier.  Updating it has relocked the phone to it's original carrier.  You will not get the phone working again without a SIM from the original carrier.

  • After an update my airport is not working. It won't turn on. Do I need to redownload a driver, and how?

    After an update my airport is not working. It won't turn on no matter how many times I press the turn on Wi Fi button. Do I need to redownload a driver, and how?

    Hello
    Try this
    plug a WIERED mouse , start up your imac , hold on mouse buttons for 30-40 second at least by chance cd could be ejected
    HTH
    Pierre

Maybe you are looking for

  • Save as word

    Hello, We just bought a new macbook pro, and one of the first purchases we made was Pages'11.  I am finding that while it "can" create word documents, when I open them on the PC the formatting is just off.  These are not fancy documents we are creati

  • When creating an RFQ from a Requisition, Req doesn't clear Autocreate

    Hello. I am trying to research the Req to RFQ to Quotation to PO functionality. When I autocreate a Req line into an RFQ, the REQ line doesn't clear Autocreate. Why is that? Thanks for any help. Martin

  • Line 21 scc file Out Of Sync by 1 hour

    I have a project for which I have added a CC .scc file to the main track. However, when I test the DVD Build, the captions are displayed EXACTLY one hour off. The original video, exported from FCP, has a start time code of 1:00:00;00, as does the .sc

  • Can't run Toast 7 Titanium's CD Spin Doctor - please help!

    Hello, I don't know if I'm posting in the appropriate forum or not, but here goes... I got a LaCie d2 Dual DVD+/_ RW Drive for Christmas, along with a brand new copy of Roxio's Toast 7 Titanium. I recently installed all the driver software and everyt

  • Syntax of DBCA Template files (.dbt)

    Hi! I am looking for documentation on the content / syntax of DBCA template (.dbt) files. I have searched the 10G documentation and MetaLink without success. Any help or hints is appreciated. I am especially interested in setting up my own variables