After insert trigger with :NEW.ROWID

Hi All,
I am using a After insert trigger to generate history record as following:
CREATE TABLE TB_TEST (classID number(3), classNm varchar2(12));
CREATE TABLE TB_HIST_TEST (hist_dttm timestamp(6), classID number(3), classNm varchar2(12));
CREATE or REPLACE TRIGGER air_test AFTER INSERT ON tb_test FOR EACH ROW
BEGIN PK_SRVC.CRT_NewRec('TB_TEST', 'TB_HIST_TEST', :new.ROWID); END:
In PK_SRVC package, I use the following statment to create new record in TB_HIST_TABLE:
     Insert into tb_hist_test (hist_dttm, classID, classNm)
     values (select systimestamp, classID, classNm from tb_test where rowid = ROWID )
The trigger DOES fire when a new row is inserted into TB_TEST. However there is no record inserted into TB_HIST_TEST. Any suggestion?
Thanks,

The PK_SRVC.CRT_NewRec is a generic service package that can be shared by many tables. It uses dynamic SQL to get all the collumns for different tables based on USER_TAB_COLUMNS.  The following is the code of this package:
PROCEDURE CRT_NewRec ( p_TableName IN VARCHAR2, p_AudTableName IN VARCHAR2, p_RowID)
IS
       TYPE TabCol_RecTyp IS RECORD (COLUMN_NAME VARCHAR2(30), COLUMN_ID NUMBER);
       TYPE TabCol_CurTyp IS REF CURSOR;
        c_TabCol TabCol_CurTyp;
        rc_TabCol TabCol_RecTyp;
        v_Sql_TabCol VARCHAR2(1000);
        v_ColNames VARCHAR2(1000);
        v_Sql VARCHAR2(1000);
        PRAGMA AUTONOMOUSE_TRANSCATION;
BEGIN
        v_SQL_TabCol := ' SELECT column_name, column_id FROM USER_TAB_COLUMNS'
                                  ||  ' WHERE table_name = ' || CHR(39) || p_TableName || CHR(39)
                                  || '  ORDER BY column_id';
        v_ColNames := NULL;
        OPEN c_TabCol FOR v_Sql_TabCol;
        Loop
               FETCH c_TabCol INTO rc_TabCol; Exit WHEN c_TabCol%NOTFOUND:
               v_ColNames := v_ColNames || ',' || rc_TabCol.COLUMN_NAME;
        End Loop;
        CLOSE c_TabCol;
        v_Sql := 'INSERT INTO ' || p_AudTableName || '(HIST_DTTM, ' || v_ColNames || ' )'  
                  || ' SELECT systimestamp, ' || v_ColNames || ' FROM ' || p_TableName
                  || ' WHEN ROWID = chartorowid(' || CHR(39) || p_RowId || CHR(39) || ')';
         EXECUTE IMMEDIATE v_Sql;
         COMMIT;
END;    
(charmingholidays-yyz)

Similar Messages

  • After Insert Trigger with DML on the subject table?

    I am trying to set up e-mail notifications, so I created a procedure, which accepts the argument of an id. In the procedure, it queries the table and sends out mail based on the result set. (in the trigger, I pass in the value of :NEW.id). The procedure then queries the table for that row id.
    First, for the after update I was getting the error:
    ORA-04091: table is mutating, trigger/function may not see it ORA-06512
    So, I was advised to do in the declare block: pragma autonomous_transaction; I did that, and that solved the problem there. SO I did the same in the after insert trigger, but then I get the error:
    ORA-00060: deadlock detected while waiting for resource ORA-06512
    I asked our DBA and he said you are not able to query the table of which the trigger is a subject of. I thought it would be possible since its After insert or update?
    Can anyone offer any suggestions ? :)
    Thanks,
    Trent

    Any reason why it would work in an after update trigger then?
    So, I was advised to do in the declare block: pragma autonomous_transaction; I did that, and that solved the problem therePRAGMA AUTONOMOUS_TRANSACTION "bends" the restriction against SQL against base table.
    It is the equivalent to tap dancing across a mine field.
    You might get the desired results most of the time or you might get a tasty surprise when you least expect it.
    What happens to your application in the future, if/when the UPDATE has a ROLLBACK issued & PRAGMA AUTONOMOUS_TRANSACTION has successfully completed?
    Inquiring minds would like to know the answer.

  • After Insert Trigger - IF-THEN-ELSE

    Is it possible to put an if-then-else statement in an after insert trigger with an update to a second table?
    CREATE OR REPLACE trigger bev_trg
    after insert
    on bev
    for each row
    DECLARE
    MEINS VARCHAR2(3);
    SPART VARCHAR2(2);
    FKIMG NUMBER(22);
    SHKZG CHAR(1);
    BEGIN
    insert into bev2
    (vbeln,
    posnr)
    values
    (:new.vbeln,
    :new.posnr
    IF FKIMG = '10' and MEINS = 'EA'
    THEN
         update bev2 set bwsie = (fkimg * '12.17') ;
    ELSIF
    FKIMG = '12' and MEINS = 'EA'
    THEN
         update bev2 set bwsie = (fkimg * '19.02');
    ELSIF
    SHKZG = 'X'
    THEN
         update bev2 set bwsie = (fkimg * '-1');
    ELSE
         update bev2 set bwsie = '0' ;
    END IF;
    update bev2 set bwfkimg = (fkimg * '-1') where SHKZG = 'X';
    end;
    This does not do the updates.
    Thanks
    Bev

    My original problem is this: I need to create a table
    derived from data in another table
    and change it to be the conditional data in the update statements.
    create table bev(
    VBELN VARCHAR2(10),
    POSNR VARCHAR2(6),
    MEINS VARCHAR2(3),
    SPART VARCHAR2(2),
    FKIMG NUMBER(22),
    SHKZG CHAR(1),
    BWSIE NUMBER(9,2),
    BWFKIMG NUMBER(22)
    update bev set bwsie = (fkimg * '12.17') where SPART = '10' and meins = 'EA' ;
    update bev set bwsie = (fkimg * '19.02') where SPART = '12' and meins = 'EA';
    update bev set bwsie = (fkimg * '27.39') where SPART = '15' and meins = 'EA';
    update bev set bwsie = (fkimg * '48.69') where SPART = '20' and meins = 'EA';
    update bev set bwsie = (fkimg * '109.56') where SPART = '30' and meins = 'EA';
    update bev set bwsie = '0' where meins = 'EA' and SPART not in('10','12','15','20','30');
    update bev set bwsie = (fkimg * '-1') where SHKZG = 'X';
    update bev set bwfkimg = (fkimg * '-1') where SHKZG = 'X';
    This did not produce the required results so I thought I would try
    creating a second table
    and using a trigger with if-then-else to update it.
    Can't use the trigger on the
    original table because it mutates.
    create table bev2(
    VBELN VARCHAR2(10),
    POSNR VARCHAR2(6),
    BWSIE NUMBER(9,2),
    BWFKIMG NUMBER(22)
    insert into bev select vbeln, posnr, meins, spart, fkimg , shkzg, '', ''
    from [email protected]
    where vbeln = '0090043834' and posnr = '000011'
    insert into bev select vbeln, posnr, meins, spart, fkimg , shkzg, '', ''
    from [email protected]
    where vbeln = '0090043833' and posnr = '000011'
    CREATE OR REPLACE trigger bev_trg
    after insert
    on bev
    for each row
    DECLARE
    MEINS VARCHAR2(3);
    SPART VARCHAR2(2);
    FKIMG NUMBER(22);
    BEGIN
    insert into bev2
    (vbeln,
    posnr,
    fkimg
    values
    (:new.vbeln,
    :new.posnr,
    :new.fkimg
    IF :new.FKIMG = '10' and :new.MEINS = 'EA'
    THEN
    update bev2 set bwsie = (:new.fkimg * '12.17') ;
    ELSIF
    :new.FKIMG = '12' and :new.MEINS = 'EA'
    THEN
    update bev2 set bwsie = (:new.fkimg * '19.02');
    ELSIF
    :new.FKIMG = '15' and :new.MEINS = 'EA'
    THEN
    update bev2 set bwsie = (:new.fkimg * '27.39');
    ELSIF
    :new.FKIMG = '20' and :new.MEINS = 'EA'
    THEN
    update bev2 set bwsie = (:new.fkimg * '48.69');
    ELSIF
    :new.FKIMG = '30' and :new.MEINS = 'EA'
    THEN
    update bev2 set bwsie = (:new.fkimg * '109.56');
    ELSIF
    SHKZG = 'X'
    THEN
    update bev2 set bwsie = (:new.fkimg * '-1');
    ELSE
    update bev2 set bwsie = '0' ;
    END IF;
    update bev2 set bwfkimg = (:new.fkimg * '-1') where SHKZG = 'X';
    end;

  • Update by after insert trigger

    I need to update each new inserted row of data by checking if there were same values in the table. So I tried the After Insert Trigger with the code below :
    CREATE OR REPLACE TRIGGER approve_checker
    after insert on TBL_BILL
    for each row
    declare
    counter integer;
    begin
    SELECT COUNT() INTO counter FROM TBL_BILL WHERE issue_date=:NEW.issue_date AND wagon_no=:NEW.wagon_no ;*
    IF( counter > 1)
    THEN
    UPDATE TBL_BILL SET approved = 2 WHERE id = :NEW.id;
    END IF;
    end approve_checker;
    But errors accured :
    ORA-04091: table RAIL.BILL is mutating, trigger/function may not see it
    ORA-06512: at "RAIL.APPROVE_CHECKER", line 4
    ORA-04088: error during execution of trigger 'RAIL.APPROVE_CHECKER'
    Any help appreciated.

    You cannot SELECT from the table on which the row-level trigger is defined, nor can you UPDATE a table on which the row-level trigger is defined. If you are inserting multiple rows in a single INSERT statement, Oracle can't be sure what rows to update and/or select.
    Is there a reason that you wouldn't just create a unique constraint to enforce this condition?
    Justin

  • Using Database Change Notification instead of After Insert Trigger

    Hello guys! I have an after insert trigger that calls a procedure, which in turn is doing an update or insert on another table. Due to mutating table errors I declared the trigger and procedure as autonomously transactional. The problem is, that old values of my main tables are inserted into the subtable since the after insert/update trigger is fired before the commit.
    My question is how can I solve that and how could I use the change notification package to call my procedure? I now that this notification is only started after a DML/DDL action has been commited on a table.
    If you could show me how to carry out the following code with a Database Change Notification I'd be delighted. Furthermore I need to know if it suffices to set up this notification only once or for each client seperately?
    Many thanks for your help and expertise!
    Regards,
    Sebastian
    declare
    cnumber number (6);
    begin
    select count(*) into cnumber from (
    select case when (select date_datum
        from
          (select f.date_datum,
            row_number() over (order by f.objectid desc) rn
          from borki.fangzahlen f
          where lng_falle      = :new.lng_falle
          and int_fallennummer = :new.int_fallennummer
          and lng_schaedling   = :new.lng_schaedling
          and date_datum       > '31.03.2010'
        where rn=1) < (select date_datum
        from
          (select f.date_datum,
            row_number() over (order by f.objectid desc) rn
          from borki.fangzahlen f
          where lng_falle      = :new.lng_falle
          and int_fallennummer = :new.int_fallennummer
          and lng_schaedling   = :new.lng_schaedling
          and date_datum       > '31.03.2010'
        where rn=2) then 1 end as action from borki.fangzahlen
            where lng_falle      = :new.lng_falle
            and int_fallennummer = :new.int_fallennummer
            and lng_schaedling   = :new.lng_schaedling
            and date_datum       > '31.03.2010') where action = 1;
    if cnumber != 0 then
    delete from borki.tbl_test where lng_falle = :new.lng_falle
    and int_fallennummer = :new.int_fallennummer
    and lng_schaedling   = :new.lng_schaedling
    and date_datum       > '31.03.2010';
    commit;     
    pr_fangzahlen_tw_sync_sk(:new.lng_falle, :new.int_fallennummer, :new.lng_schaedling);

    It looks like you have an error in line 37 of your code. Once you fix that the problem should be resolved.

  • Calling of Stored Procedure in After Insert Trigger

    Can I call a Stored Procedure in After Insert Trigger ?
    Please send a sample code (good example) of After Insert Trigger.
    Thanks.

    Kishore,
    I have two table WLCS_ORDER, WLCS_ORDER_LINE
    WLCS_ORDER - It holds order header information like
    ORDER_ID
    CUSTOMER_ID
    TRANSACTION_ID
    STATUS
    ORDER_DATE
    SHIPPING_METHOD
    SHIPPING_AMOUNT
    SHIPPING_CURRENCY
    PRICE_AMOUNT
    PRICE_CURRENCY
    SHIPPING_GEOCODE
    SHIPPING_STREET1
    SHIPPING_STREET2
    SHIPPING_CITY
    SHIPPING_STATE
    SHIPPING_COUNTRY
    SHIPPING_POBOX
    SHIPPING_COUNTY
    SHIPPING_POSTAL_CODE
    SHIPPING_POSTAL_CODE_TYPE
    SPECIAL_INSTRUCTIONS
    SPLITTING_PREFERENCE
    ORDER_SUBTOTAL
    WLCS_ORDER_LINE - It holds all order lines information like
    ORDER_LINE_ID
    QUANTITY
    PRODUCT_ID
    TAX_AMOUNT
    TAX_CURRENCY
    SHIPPING_AMOUNT
    SHIPPING_CURRENCY
    UNIT_PRICE_AMOUNT
    UNIT_PRICE_CURRENCY
    MSRP_AMOUNT
    MSRP_CURRENCY
    DESCRIPTION
    ORDER_ID
    TOTAL_LINE_AMOUNT
    Relation between WLCS_ORDER, WLCS_ORDER_LINE is one to many.
    For each WLCS_ORDER row, one or more order lines will insert into WLCS_ORDER_LINE table.
    For each new row in WLCS_ORDER table, I have to update the following columns in both the tables with my maths.
    WLCS_ORDER
    shipping_amount
    price_amount
    order_subtotal
    WLCS_ORDER_LINE
    shipping_amount
    I thought I can do this in after insert trigger, But if it is not possible, Please give the best way to fulfill this requirement.
    I appreciate your help.
    Have a great day.
    Srinivas

  • After insert trigger

    Dears,
    In after insert trigger implementation if the base table failed due to some errors.
    Is it possible to still have records inserted in the log table inside the trigger
    Thanks
    Janani.C

    What you want is to write log records to a table, regardless of whether the transaction they're logging fails. This would make sense for inevstigating errors,e tc. This is the only time when it is acceptable to use autonomous transactions.
    Encapsulate your logguing code in a separate procedure which has the {font:courier new}PRAGMA autonomous_transaction{font} in its declaration, and include a commit. Such a procedure works in its own separate tranasction - a separate session in fact - and write the log record without affecting the broader transaction. [url http://docs.oracle.com/cd/B19306_01/appdev.102/b14261/sqloperations.htm#sthref1515]Find out more.
    Cheers, APC
    P.S. I agree with Hoek that you should investigate teh LOG ERRORS INTO functionality, as it can be very useful, especially with bulk processes. However, it can only store information directly relating to the rejected records, which might not be sufficient for your purposes.

  • After insert trigger issue

    Hi All,
    Can I have an after insert trigger on a table wherein the execution is also on the same table?
    It's like 10 columns in the table A.
    During a new row insertion, except one specific column(say 'J'), remaining all getting data.
    Now 'after insert', need to update the data of the column J based on one inserted value for column say ID.
    Code goes like below:
    CREATE OR REPLACE TRIGGER UPDATE_J
    AFTER INSERT ON A REFERENCING NEW AS NEW OLD AS OLD
    FOR EACH ROW
    begin
    if :new.ID = 'N%' then
         :new.J:= 'N';
    else
         :new.J:= 'M';
    end if;
    end;
    Below is the error when I tried to execute that.
    ORA-04091: table string.string is mutating, trigger/function may not see it
    Cause: A trigger (or a user defined plsql function that is referenced in this statement) attempted to look at (or modify) a table that was in the middle of being modified by the statement which fired it.
    Action: Rewrite the trigger (or function) so it does not read that table.
    Any idea to resolve?
    Regards,
    Seetharaman.

    Hi,
    The docs say
    Restrictions on AFTER
          An AFTER row trigger or AFTER row section of a compound trigger can only read but not write into the :OLD or :NEW fields. When faced with problems like this, it is always a good thing to consult the documentation.
    Regards
    Peter

  • Before or After insert trigger on HR_API_TRANSACTION_VALUES

    I am on the termination page of SSHR and after entering the details when clcked on 'Next' the validations built in before / after insert trigger of HR_API_TRANSACTION_VALUES does not retrieve the data and the error 'No data found' is displayed.
    We do not have AME approval. When clicked on 'Next' it goes to the review page. When I do a select on the HR_API_TRANSACTION_VALUES the data do exists but the validation does not work.
    We have Oracle HRMS 11i with database as 11g.
    Please give a resolution at the earliest.

    you can use
    hr_transaction_api.set_varchar2_value
    or
    hr_transaction_api.set_number_value
    based on what type of value that you want to update

  • Error in after insert trigger

    Hello all,
    I have a question about after insert trigger. Will be new row inserted and commited if after insert trigger returns error? Thank you.
    regards,
    Miha

    What is the error that u r facing?
    there could multiple reasons for that. Basically, u can't put commit in the trigger (unless it is an autonomous transaction). Share the pseudo-code of u r triiger, so that , problem can be identified.
    Cheers,
    Ram Kanala

  • Old address still showing in contact after I edit with new address. However, it shows correct address when in edit mode. Is this a new glitch on the iPhone iOS 7?

    Old address still showing in contact after I edit with new address. However, it shows correct address when in edit mode. Is this a new glitch on the iPhone iOS 7?

    1) Is it a video clip? Something you recognize?  To be clear, it's displaying at a point in your exported movie but doesn't appear at all in the sequence?
    2) What are your sequence settings?  Right-click your sequence and choose "Item Properties" to verify.

  • Can't able to use :NEW in after insert trigger

    When i am trying to assign value to an element of the NEW pseudo record, its giving error like :new pseudo record can't be used in this type of trigger.
    What exactly i've done is given below
    create or replace triger tri_name
    after insert
    on tab_name
    for each row
    begin
    if :new.x='123' then
    :new.y:=null;
    end if;
    end tri_name;
    Thanks & Regards
    --DKar                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    from oracle documentation...
    Old and new values are available in both BEFORE and AFTER row triggers. A new column value can be assigned in a BEFORE row trigger, but not in an AFTER row trigger (because the triggering statement takes effect before an AFTER row trigger is fired). If a BEFORE row trigger changes the value of new.column, then an AFTER row trigger fired by the same statement sees the change assigned by the BEFORE row trigger.
    for more details read the documentation

  • After Insert Trigger Not Working

    Hi All,
    I am not a guru in writing triggers.
    I am inserting new records in a Table FA_BOOKS by application and this inserts records in FA_ADDITIONS_B. This is a vanilla process.
    i have written a trigger on FA_ADDITIONS_B, and i want to update the cost from the fa_books to fa_additions_b column attribute21
    The trigger i have written is After insert on FA_ADDITIONS_B and i try to select cost from the fa_books for the :new.asset_id.
    SELECT COST
    INTO v_cost
    FROM FA_BOOKS
    WHERE ASSET_ID = :NEW.ASSET_ID;
    this is always returning no_data_found exception and i do not understand how to update the attribute21 in FA_ADDITIONS_B
    Here is a sample of my trigger.
    CREATE OR REPLACE TRIGGER update_attribute21_new_asset_1
    after INSERT ON fa_ADDITIONS_B
    FOR EACH ROW
    DECLARE
    V_COST NUMBER;
    BEGIN
    SELECT COST
    INTO v_cost
    FROM FA_BOOKS
    WHERE ASSET_ID = :NEW.ASSET_ID;
    update fa_ADDITIONS_B
    set attribute21 = v_cost
    where ASSET_ID = :NEW.ASSET_ID;
    END;
    Any help on this will be appreciated.
    TX in advance.
    Regards,

    I still haven't understood the reason why you can't transfer the COST information from FA_BOOKS to FA_ADDITIONS_B in the initial trigger on FA_BOOKS that populates FA_ADDITIONS_B. Or how is the population of FA_ADDITIONS_B accomplished? Is it part of the application code?
    Regarding the NO_DATA_FOUND issue:
    Is it ensured that populating the FA_ADDITIONS_B table is done in the same transaction as the FA_BOOKS inserts or that the FA_BOOKS transaction is committed?
    Why do you need that additional trigger?
    My assumption is that you're in a trigger "chain" - if I get your approach correctly - you're basically attempting to query FA_BOOKS in a trigger on FA_ADDITIONS_B that in turn has been triggered by a trigger on FA_BOOKS which gets us back to the "mutating" trigger issue. You can't read a table that is currently in the process of being modified.
    Or even worse: The (potential) trigger on FA_BOOKS that populates FA_ADDITIONS_B uses "autonomous transaction" and therefore the trigger on FA_ADDITIONS_B can't see the changes of the original transaction.
    As already mentioned: Be very careful with "autonomous transactions" in general. There are only a few cases where these are actually useful (e.g. logging purposes), but Tom Kyte has written numerous articles why triggers and in particular autonomous transactions are mostly evil.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Insert trigger with if condition

    Hi.
    I am new sql programming and I am trying to write a insert trigger.
    I have created an insert-trigger that inserts into another table(p_person) whenever the trigger table (p_personmds) gets insterted:
    CREATE OR REPLACE TRIGGER INSERT_P_PERSON_TG
    AFTER INSERT ON P_PERSONMDS
    FOR EACH ROW
    BEGIN
    insert into P_PERSON (person,person_id,person_name,email_address,disabled)
    values (seq_p_person.nextval,:new.person_id,:new.person_name,:new.email_address,:new.disabled);
    END INSERT_P_PERSON_TG;
    After testing the trigger I discovered that I need to add some checking to the trigger:
    If person_id already exists in the p_person table I need to just update the 'DISABLED' column and set it to 'null' value.
    So I tried modifying the trigger:
    CREATE OR REPLACE TRIGGER TESTMDS.INSERT_P_PERSON_TG
    AFTER INSERT ON TESTMDS.P_PERSONMDS
    FOR EACH ROW
    BEGIN
    IF :new.disabled is not null
    THEN
    update p_person set disabled=NULL where person_id=:old.person_id;
    ELSE
    insert into P_PERSON (person,person_id,person_name,email_address,disabled)
    values (seq_p_person.nextval,:new.person_id,:new.person_name,:new.email_address,:new.disabled);
    END IF;
    END INSERT_P_PERSON_TG;
    Hovewer the triggers seems to ignore the first if update condition and only inserts another row with mulitiple values.
    Anyone know what I am doeing wrong here?

    user12064835 wrote:
    so if I use: 'IF :OLD.Disabled is not NULL then' ,
    will :OLD:Disabled represent the p_person table or do I have to come up with something new?if you use :old.Disable, it will run always the ELSE-block.
    you should write your block as same thing like follows:
    IF :new.disabled is not null THEN
      update p_person set disabled=NULL where person_id=:old.person_id;
      IF SQL%ROWCOUNT = 0 THEN --this block will be executed if there was no row updated in table p_person
        insert into P_PERSON (person,person_id,person_name,email_address,disabled)
        values (seq_p_person.nextval,:new.person_id,:new.person_name,:new.email_address,:new.disabled);
      END IF;
    ELSE
      insert into P_PERSON (person,person_id,person_name,email_address,disabled)
      values (seq_p_person.nextval,:new.person_id,:new.person_name,:new.email_address,:new.disabled);
    END IF;but
    user12064835 wrote:
    if DISABLED column is not null in p_person table I want to insert a null value in the DISABLED column in p_person
    where the person_id that gets inserted in p_personmds table = person_id in p_person table.means
      update p_person set disabled=NULL where person_id=:old.person_id AND disabled is not NULL; 

  • Pb Trigger with :new

    Hello
    When I use this Trigger:
    CREATE OR REPLACE TRIGGER TMM_EXPLOSE_T
    AFTER INSERT ON TMM_EXPLOSE
    REFERENCING NEW AS NEW OLD AS OLD
    FOR EACH ROW
    DECLARE TTCNT INTEGER;
    BEGIN
    TTCNT:=0;
    IF (:NEW.TMM_TYPE != 'SNBOM') THEN
    TMM_EXPLOSE_P(:NEW.TMM_TYPE,:NEW.USERNAME,:NEW.CAL,:NEW.POS,:NEW.DDATE,:NEW.LIV,:NEW.SLIV,:NEW.MQTY,:NEW.PARENT,:NEW.CHILD,'',TTCNT);
    ELSE
    TMM_EXPLOSE_SN(:NEW.TMM_TYPE,:NEW.USERNAME,:NEW.CAL,:NEW.POS,:NEW.DDATE,:NEW.LIV,:NEW.SLIV,:NEW.MQTY,:NEW.PARENT,:NEW.CHILD,'');
    END IF;
    END;
    I receive this error:
    PLS-00553: character set name is not recognized
    I think is for the :NEW
    Could you explain me how i can do it work please
    I use Orcale 9.2.0.1.0 on Unix server with
    NLS_CHARACTERSET     WE8ISO8859P15
    NLS_NCHAR_CHARACTERSET     AL16UTF16
    NLS_LANGUAGE     AMERICAN
    Thank you
    Pierre Diaz

    hi:
    what version of Project Raptor are you using?
    I created a tmm_explose table with just a column tmm_type;
    I open a sql worksheet on Raptor 08.04 on linux, and when I run
    CREATE OR REPLACE TRIGGER TMM_EXPLOSE_T
    AFTER INSERT ON TMM_EXPLOSE
    REFERENCING NEW AS NEW OLD AS OLD
    FOR EACH ROW
    DECLARE TTCNT INTEGER;
    BEGIN
    TTCNT:=0;
    IF (:NEW.TMM_TYPE != 'SNBOM') THEN
    -- TMM_EXPLOSE_P(:NEW.TMM_TYPE,:NEW.USERNAME,:NEW.CAL,:NEW.POS,:NEW.DDATE,:NEW.LIV,:NEW.SLIV,:NEW.MQTY,:NEW.PARENT,:NEW.CHILD,'',TTCNT);
    null;
    ELSE
    -- TMM_EXPLOSE_SN(:NEW.TMM_TYPE,:NEW.USERNAME,:NEW.CAL,:NEW.POS,:NEW.DDATE,:NEW.LIV,:NEW.SLIV,:NEW.MQTY,:NEW.PARENT,:NEW.CHILD,'');
    null;
    END IF;
    END;
    /the message is a popup window stating: "An error was encountered performing the requested operation: Missing IN or OUT parameter at index:: 1 Vendor code 17041"
    The same works when I put :new in quotes:
    CREATE OR REPLACE TRIGGER TMM_EXPLOSE_T
    AFTER INSERT ON TMM_EXPLOSE
    REFERENCING NEW AS NEW OLD AS OLD
    FOR EACH ROW
    DECLARE TTCNT INTEGER;
    BEGIN
    TTCNT:=0;
    IF (:"NEW".TMM_TYPE != 'SNBOM') THEN
    -- TMM_EXPLOSE_P(:NEW.TMM_TYPE,:NEW.USERNAME,:NEW.CAL,:NEW.POS,:NEW.DDATE,:NEW.LIV,:NEW.SLIV,:NEW.MQTY,:NEW.PARENT,:NEW.CHILD,'',TTCNT);
    null;
    ELSE
    -- TMM_EXPLOSE_SN(:NEW.TMM_TYPE,:NEW.USERNAME,:NEW.CAL,:NEW.POS,:NEW.DDATE,:NEW.LIV,:NEW.SLIV,:NEW.MQTY,:NEW.PARENT,:NEW.CHILD,'');
    null;
    END IF;
    END;
    /Please, note that I just commented the tmm_explose_p function (for lazyness... :-))

Maybe you are looking for

  • File from AIX to AS/400 via FTP

    Hi, i need to transfer a file as it is from AIX to AS/400. Doing that with WS-FTP works fine. So i set up a scenario in XI, getting the file from the AIX with NFS and putting the file to the AS/400 with FTP. The runtime workbench tells me that everyt

  • Import not authenticating portal user

    I am using Portal 10.1.4 and am trying to import a portal from another Portal 10.1.4 instance. I have retrieved the import/export script from the web interface from the source system (in Navigator when selecting Export for the relevant Page Group). H

  • Automator custom date ranges

    Does anyone know if the "Find finder item" function in automator will allow me to find all files within a time range that is subject to change? I would like to use automator to find all files created "since last week" or "since three days ago". I am

  • Disable portal,km startup in multi-application dual stack

    Hello, We have a dual stack ECC installation with ESS,MSS,Portal and XECO on the java stack. We are currenty trying to run debug against the XECO components on the java stack. It appears that the debugger is getting very slow due to the multiple java

  • WUC-5 No webtil configuration File specified

    Hi, I have a problem using Webutil. It gives me "WUC-5 No webtil configuration File specified" while running the form. The formsweb.cfg, webutil.env and all locations(in configuration files and classpath) are fine and Java Console output is proxyHost