Help in trigger creation

Hi guys,
I am using oracle 10g on windows 2003 server.
I have two tables namely PEOPLE and UG_COMMAND.
There are two columns in People table- STAFF_CODE and USER_29. I want to create a trigger which should check if STAFF_CODE is null and
USER_29 is not null. On meeting this condition it should populate command column of UG_COMMAND table.
Thanks for help!!

Hi
Create or replace trigger people_trrg
after insert on people for each row
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
BEGIN
if :new.user_29 is not null then
if :new.staff_code is null then
Insert into UG_Command (command) values ('some value');
else
Insert into UG_Command (command) values ('some value');----this will kick in if the value is not null
end if;
end if;
EXCEPTION
    WHEN others THEN Raise;
END;Note: If there are some other not null columns in UG_command, then the trigger will fail, you need to include all not null columns
HTH

Similar Messages

  • Many sequences/trigger creations in one script?

    Hallo,
    I want to put some trigger creations in one script, but SQL*Plus doesn't create many triggers, it does create one trigger with compilation errors. When I only use one trigger creation statement alone (and this for all triggers after eachother), all works fine without any errors.
    This is my script:
    create sequence table1_seq;
    create sequence table2_seq;
    -- for Table 1
    create or replace trigger table1_ins_trig
    before insert on TABLE1
    for each row
    declare
    seq_val NUMBER(9);
    begin
    select table1_seq.nextval into seq_val from dual;
    :new.TABLE1ID := seq_val;
    end;
    -- for Table 2
    create or replace trigger table2_ins_trig
    before insert on TABLE2
    for each row
    declare
    seq_val NUMBER(9);
    begin
    select table2_seq.nextval into seq_val from dual;
    :new.TABLE12D := seq_val;
    end;
    All sequences are created and trigger for table1 with errors. When I use the trigger statements separately, all works. How can I use many trigger creations in one script?
    Regards
    Stephan Schneider

    You have to end each pl/sql block with a slash:
    create or replace...
    begin
    end;
    create or replace...

  • Schedule line Release with help of release creation profile.

    Hello,
    Is it possible to create the schedule line release for scehule line automaticaly by heuristcs run with the help of release creation profile of external procurement relationship ?
    We can release the schedule line in product view.
    What is other way release the schedule line?

    Hi,
    Credit check is done to see if the customer has crossed his credit limit or not. Incase you want to forcefully release order we use [VKM1]. What is this got to do with the schedule lines??? Irrespective of whether the order is under credit hold or no the schedule line are determined the same way. Didnt understand the connection.
    Regards
    Nadarajah Pratheb

  • Doubt about explan plan invalidation, by trigger creation

    Hi all,
    Another DBA told me that after trigger creation all explain plan on that table are invalidated and a new parse is necessary.
    Is that true?
    Tx,
    Everson

    You could put a test case together to examine how it works:
    SQL> SELECT * FROM V$VERSION;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0      Production
    TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    SQL> DROP TABLE TAB1;
    Table dropped.
    SQL> CREATE TABLE TAB1(ID NUMBER);
    Table created.
    SQL> INSERT INTO TAB1 SELECT ROWNUM FROM DUAL CONNECT BY LEVEL <= 10;
    10 rows created.
    SQL> COMMIT;
    Commit complete.
    SQL> SELECT statname.name
      2       , mystat.value
      3  FROM   v$mystat   mystat
      4  JOIN   v$statname statname ON mystat.statistic# = statname.statistic#
      5  WHERE  statname.name IN ('parse count (total)','parse count (hard)')
      6  ;
    NAME                                                                            VALUE
    parse count (total)                                                               653
    parse count (hard)                                                                145
    SQL> SELECT COUNT(*) FROM tab1;
                COUNT(*)
                      10
    SQL> SELECT statname.name
      2       , mystat.value
      3  FROM   v$mystat   mystat
      4  JOIN   v$statname statname ON mystat.statistic# = statname.statistic#
      5  WHERE  statname.name IN ('parse count (total)','parse count (hard)')
      6  ;
    NAME                                                                            VALUE
    parse count (total)                                                               658
    parse count (hard)                                                                147
    SQL> SELECT COUNT(*) FROM tab1;
                COUNT(*)
                      10
    SQL> SELECT statname.name
      2       , mystat.value
      3  FROM   v$mystat   mystat
      4  JOIN   v$statname statname ON mystat.statistic# = statname.statistic#
      5  WHERE  statname.name IN ('parse count (total)','parse count (hard)')
      6  ;
    NAME                                                                            VALUE
    parse count (total)                                                               662
    parse count (hard)                                                                147
    SQL> CREATE OR REPLACE TRIGGER TRG_TAB1_RAFI
      2  AFTER INSERT ON TAB1
      3  FOR EACH ROW
      4  BEGIN
      5          DBMS_OUTPUT.PUT_LINE('Trigger Fired!');
      6  END;
      7  /
    Trigger created.
    SQL> SELECT statname.name
      2       , mystat.value
      3  FROM   v$mystat   mystat
      4  JOIN   v$statname statname ON mystat.statistic# = statname.statistic#
      5  WHERE  statname.name IN ('parse count (total)','parse count (hard)')
      6  ;
    NAME                                                                            VALUE
    parse count (total)                                                               691
    parse count (hard)                                                                148
    SQL> SELECT COUNT(*) FROM tab1;
                COUNT(*)
                      10
    SQL> SELECT statname.name
      2       , mystat.value
      3  FROM   v$mystat   mystat
      4  JOIN   v$statname statname ON mystat.statistic# = statname.statistic#
      5  WHERE  statname.name IN ('parse count (total)','parse count (hard)')
      6  ;
    NAME                                                                            VALUE
    parse count (total)                                                               696
    parse count (hard)                                                                150
    SQL>
    SQL> spool off;

  • Trigger creation - Help Required

    Hi,
    New to pl/sql and would like some help in trying to achieve the following.
    I have 2 tables with one being a history table. When someone insert into the first table not the history table. I'd like to create a trigger that will retrieve the last entry for the given id in the history table, then manipulate it to have the same values that have been inserted into the main table, which will result in an insert statement being executed on the history table.
    I've created 2 small test table with
    create table cs1 (name varchar2(6), age number(3), ins_date date);
    create table cs2 (name varchar2(6), age number(3));
    What I'd like to trigger to looks like
    create or replace trigger cs_trig
    after insert on cs2
    begin
    insert into cs1 (name,age.ins_date)
    values (col_value_of_cs2.name, col_values_of_cs2.age, sysdate);
    end;
    I'm unsure as to how to populate the name and age variable.
    This is my first attempt. Sorry if it simple.
    Thanks
    Caron

    Hi Andrew,
    Thanks for your help. Could you explain what and are? As I've tried to the create and I'm receiving errors.
    SQL> create or replace trigger cs_trig
    2 after insert on cs2 fro each row
    3 begin
    4 insert into cs1 (name,age.ins_date)
    5 values (:NEW.name, (:NEW..age, sysdate);
    6 end;
    7 /
    after insert on cs2 fro each row
    ERROR at line 2:
    ORA-04079: invalid trigger specification

  • How to trigger creation of collective orders

    Hi,
    How to trigger the creation of Collective orders.
    regards

    Hi,
    Collective Orders
    Use
    In a collective order, planned orders or production orders are linked to one another over several production levels. Each order in the collective order has its own order number. If subassemblies are produced directly for superior orders within a production process, without physically entering the warehouse, it is useful to have a representation via collective orders.
    The components for which separate production orders are created in the collective order are called directly produced components (see Creating Collective Orders)
    Prerequisites
    A collective order cannot be created for components that have one of the following indicators set:
    · Co-product
    · By-product
    · Alternative item with strategy 2
    · Alternative item with usage probability 0
    · Discontinued
    · Follow-up material
    · Intra material
    Features
    Collective orders offer the following advantages:
    · Integrated view of a production process
    Collective orders make it possible to represent different levels of the production process together in the system. The production process can be viewed as an integrated whole.
    · Separate order number for every order
    Every level in a collective order represents a separate production order/planned order. Every production order/planned order has its own order number. This enables you to process the entire collective order, a subtree in the collective order or an individual order.
    · No placements in storage or removals from storage between production levels
    Within a collective order stock movements only take place for the leading order (that is, the order that is at the highest production level) and not for directly produced components. This makes it easier to maintain the collective order in comparison with several individual orders. A further advantage is a more realistic representation of the costs of the production process, since subordinate orders can be directly assigned and settled to superior orders.
    · Business functions simultaneously for several orders
    Certain business transactions can be carried out simultaneously for several orders. Releasing an order that belongs to a collective order has the effect that all the hierarchically subordinate orders are released simultaneously.
    · Automatic change to dependent orders
    Changes to an order automatically affect dependent orders / components affecting orders. For example, if you change the order quantity in an order then
    ¡ the relevant quantity changes are automatically made to dependent orders
    ¡ the requirements quantity of the directly produced component is automatically changed.
    In the collective order, you also have the option of manufacturing directly produced material in a different plant to the planning plant.
    · Set status in leading order
    If you make changes in subordinate orders that have an affect on the status, then the system sets the corresponding status in the order header of the leading order in the collective order as follows:
    u2013 CFCO Confirmation in collective order
    u2013 GMCO Goods movements in collective order
    u2013 RLNE Release taken place in network
    In this way you are informed about changes in the whole collective order.
    · Reading master data
    You can copy the routing data and BOM data to the order again. You can find more information in Read master data.
    Example
    You want to produce a pump. The BOM for the pump contains a pressure regulating valve and a spiral casing. You want to enter these two components in separate production orders, but you do not want them to be posted to stock.
    You set the special procurement type to direct production in the material master record for the pressure regulating valve and the spiral casing, so that production occurs using a collective order.
    When you create a production order for the pump, a collective order is automatically created, which contains subordinate production orders for the pressure regulating valve and the spiral casing.
    Creation of Collective Orders
    Use
    Collective orders are only created if the special procurement type is set to direct production in the components for which the separate production orders are to be created (materials planning area in the material master).
    In the standard system, 52 is the special procurement type for direct production (that is, for components that are produced within a collective order).
    To create a collective order, you must use an order type with internal number assignment.
    Hope this helps.
    Regards,
    Tejas

  • Urgent help needed in creation of planning application

    Hi,
    Iam new to planning. I installed planning and configured(Created planning instance, Datasource). When i login into workspace and want to create new planning application. The wizard opens correctly. After giving application name, calender,currency type, Plan type, etc... when i click finish to create a new planning application, it says *"An error occured while processing this page. Check the log for detail".* But i observed one thing the application was created in Essbase without Databases and outline. So can anyone explain me wats the exact prob. where I can see the Log details. Help me.
    Thanks in advance.

    Hi,
    Databases will not be created until you created until you refresh to essbase from within planning, you are not up to that stage yet. Only an essbase application will be created.
    What I suggest you do, is delete the essbase application. Then run planning from the start menu and not as a service, this will mean you will get any error messages displayed in the window.
    Then try and perform the application creation again and see what errors are produced.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Why do I get error PLS - 00103 in trigger creation?

    EDIT:
    Sorry, found the solution.
    Editors can remove this thread.
    Edited by: 998093 on May 21, 2013 1:57 PM

    >
    Sorry, found the solution.
    Editors can remove this thread.
    >
    That isn't what the forums are for. The forums are to help everyone, not just you.
    If you want to use the forums you have a responsibility to use them in a way that helps others as well as yourself. Asking for help and then saying you 'found the solution' is just selfish and won't help anyone else that might have the same issue.
    Please edit your thread and restore your question and then post the 'solution' that you found (which is the same as what the responders have told you).
    create or replace trigger trig_job_modify
    after update of job_id
    on employees
    for each row
    declare
      start date; -- got error here: Encountered the symbol "START" when expecting : begun function package pragma......
      end   date;
    begin
      select end_dateThe code will work if you do not use reserved words for the variables as others have said:
      v_start date; -- the original 'start' is a reserved word.
      v_end   date; -- the original 'end' is a reserved word.

  • Help with trigger

    Dear All,
    I have a trigger that works fine when the value is updated by a user but when the value is updated by another trigger it does not seem to work.
    When i log in and update the value in sqlplus it works fine but when I update a value in another table which then calls a trigger which then updates that value in the main table the trigger does not fire.
    This is the scenario. We have a table called payments. When we run a process it sets some values in this payment table.
    When this value is set in the payments table it fires a trigger which then updates the invoice table (paid_date) based on some value in the payments table.
    Now when this value in the invoices table is set by the trigger it is meant to call another trigger which should recognise this new value but this does not hapen.
    however if i go in manually and update the invoice table, the trigger fires.
    Any help will be appreciated.
    Below is the trigger that does not seem to fire.
    I have also included the trigger which sets this value
    create or replace
    TRIGGER INVOICE_PAID before
    UPDATE OF "PAID_DATE" ON "INVOICES" FOR EACH ROW
    DECLARE
    -- check if the invoice.mco_transfer_status has been updated to R
    -- if it has then insert records into the relevant tables
    -- Start the Insert based on the update of invoices.mco_transfer_status
    fa_cnt PLS_INTEGER;
    ecode VARCHAR2(100);
    thisproc CONSTANT VARCHAR2(80) := 'trap_errmesg for mco_transfer_status';
    v_value VARCHAR2(150);
    BEGIN
    -- do updates based on update of invoices.transfer_status column
    IF :NEW.PAID_DATE IS NOT NULL AND :OLD.PAID_DATE IS NULL
    THEN
    :NEW.MCO_TRANSFER_STATUS := 'R';
    :NEW.TRANSFER_STATUS:='R';
    :NEW.RECONCILED_STATUS:='R';
    INSERT INTO EMCO_INVOICE_STAGE (emco_document_number,invoice_id,raised_date,paid_date,pnr_reference,booking_date,
    gross,currency,forename,surname)
    SELECT :NEW.EMCO_DOCUMENT_NUMBER,:NEW.INVOICE_ID,:NEW.RAISED_DATE,:NEW.PAID_DATE,BK.PNR_REFERENCE,BK.BOOKING_DATE,:NEW.GROSS,
    :NEW.CURRENCY,PX.FORENAME,PX.SURNAME
    FROM BOOKINGS BK, PAX PX
    WHERE BK.BOOKING_ID=:NEW.BOOKING_ID
    AND PX.BOOKING_ID=:NEW.BOOKING_ID AND
    PX.PAX_SEQ=(SELECT MIN(px2.pax_seq) FROM PAX px2 WHERE booking_id=:NEW.BOOKING_ID AND px2.status <>'X' AND px2.pax_type='A' );
    -- Insert into PAYMENTS_STAGE table
    INSERT INTO PAYMENTS_STAGE (EMCO_DOCUMENT_NUMBER, PAYMENT_ID, INVOICE_ID, PAYMENT_DATE,PAYMENT_TYPE,AMOUNT,
    CURRENCY,CARD_NUMBER,TRANSACTIONID)
    SELECT :NEW.EMCO_DOCUMENT_NUMBER,PAYMENT_ID,INVOICE_ID,PAYMENT_DATE,PAYMENT_TYPE,AMOUNT,CURRENCY,CC.CARD_NUMBER,TRANSACTIONID
    FROM PAYMENTS PA, CREDIT_CARDS CC
    WHERE PA.INVOICE_ID=:NEW.INVOICE_ID
    AND CC.CARD_ID = PA.CARD_ID;
    :NEW.MCO_TRANSFER_STATUS:='C';
    SELECT COUNT(*) INTO fa_cnt FROM INVOICE_DETAILS WHERE
    invoice_id=:NEW.INVOICE_ID AND CHARGE_TYPE='FA';
    IF fa_cnt > 0
    THEN :NEW.TICKETING_STATUS:='R';
    ELSE
    :NEW.TICKETING_STATUS:='N';
    :NEW.EXCHANGED_DATE := :NEW.PAID_DATE;
    END IF;
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
    ecode := SQLCODE|| ' '||SQLERRM ;
    dbms_output.put_line(thisproc || ' - ' || ecode);
    v_value := thisproc || ' - ' || ecode;
    INSERT INTO DOCUMENT_STATUS_STAGE (EMCO_DOCUMENT_NUMBER, STATUS,STATUS_DATE)
    VALUES (:NEW.EMCO_DOCUMENT_NUMBER,v_value,SYSDATE);
    :NEW.MCO_TRANSFER_STATUS := 'F';
    END INVOICE_PAID;
    TRIGGER "CAM_OWNER"."CHECK_INVOICE_PAID_IN_FULL" AFTER
    UPDATE OF "PAYMENT_STATUS" ON "CAM_OWNER"."PAYMENTS"
    DECLARE
    -- check if all the payments for that invoice have been received (completed)
    -- if they are complete then sum all the payments for that invoice and compare to gross value on invoices
    v_invoice_amount NUMBER;
    v_gross_amount NUMBER;
    thisproc CONSTANT VARCHAR2(80) := 'trap_errmesg for mco_transfer_status';
    v_value VARCHAR2(150);
    BEGIN
    -- Changed as requested by nicola on 12/09/05 IF :NEW.PAYMENT_COMPLETE is not null
    --IF :NEW.PAYMENT_STATUS='C' AND :NEW.PAYMENT_STATUS <> :OLD.PAYMENT_STATUS
    --THEN
    CHECK_INVOICE_PAID_IN_FULL_PRO;
    --END IF;
    END CHECK_INVOICE_PAID_IN_FULL;
    and this is the procedure that is called
    PROCEDURE "CHECK_INVOICE_PAID_IN_FULL_PRO" IS
    -- check if all the payments for that invoice have been received (completed)
    -- if they are complete then sum all the payments for that invoice and compare to gross value on invoices
    v_invoice_amount NUMBER(20);
    v_gross_amount NUMBER(20);
    thisproc CONSTANT VARCHAR2(80) := 'trap_errmesg for mco_transfer_status';
    v_value VARCHAR2(150);
    BEGIN
    -- We will sum all the payments for that invoice that have a value in payment_complete
    --select sum(amount) into v_invoice_amount from payments where payment_complete is not null and invoice_id=:NEW.INVOICE_ID;
    FOR x IN (SELECT invoice_id FROM PAYMENTS_TEMP) LOOP
    SELECT NVL(SUM(amount),0) INTO v_invoice_amount FROM PAYMENTS
    WHERE payment_status ='C' AND invoice_id=X.INVOICE_ID;
    SELECT NVL(gross,0) INTO v_gross_amount FROM INVOICES WHERE
    invoice_id =X.INVOICE_ID;
    -- We will also get the gross amount for the invoice to compare to the sum of the payments
    IF v_invoice_amount = v_gross_amount
    THEN
    UPDATE INVOICES SET paid_date=SYSDATE
    WHERE invoice_id=X.INVOICE_ID;
    END IF;
    END LOOP;
    END CHECK_INVOICE_PAID_IN_FULL_PRO;

    The following demonstration is a direct response to your original question, in case you want to stick with that method of scheduling your index rebuilds through a trigger. In order to do ddl like alter index you will need to use dynamic sql like execute immediate. Since you can't rebuild the index before the insert or update has been committed, you will need to use dbms_job.submit to schedule the rebuild. In the following example, the index rebuild will be done as soon as the insert or update has been committed.
    scott@ORA92> CREATE TABLE cc_contenidos (cvalor CLOB)
      2  /
    Table created.
    scott@ORA92> CREATE INDEX cont ON cc_contenidos (cvalor) INDEXTYPE IS ctxsys.context
      2  /
    Index created.
    scott@ORA92> SELECT last_ddl_time FROM user_objects WHERE object_name = 'CONT'
      2  /
    LAST_DDL_TIME
    24-JAN-2005 21:10:13
    scott@ORA92> CREATE OR REPLACE PROCEDURE alter_index_cont
      2  AS
      3  BEGIN
      4    EXECUTE IMMEDIATE 'ALTER INDEX cont REBUILD ONLINE PARAMETERS (''sync memory 45M'')';
      5  END;
      6  /
    Procedure created.
    scott@ORA92> SHOW ERRORS
    No errors.
    scott@ORA92> CREATE OR REPLACE TRIGGER actualiza
      2    AFTER DELETE OR INSERT OR UPDATE on cc_contenidos
      3  DECLARE
      4    v_job NUMBER;
      5  BEGIN
      6    DBMS_JOB.SUBMIT (v_job, 'alter_index_cont;', SYSDATE);
      7  END actualiza;
      8  /
    Trigger created.
    scott@ORA92> SHOW ERRORS
    No errors.
    scott@ORA92> INSERT INTO cc_contenidos (cvalor) VALUES ('test 1')
      2  /
    1 row created.
    scott@ORA92> INSERT INTO cc_contenidos (cvalor) VALUES ('test 2')
      2  /
    1 row created.
    scott@ORA92> COMMIT
      2  /
    Commit complete.
    scott@ORA92> EXECUTE DBMS_LOCK.SLEEP (15)
    PL/SQL procedure successfully completed.
    scott@ORA92> SELECT last_ddl_time FROM user_objects WHERE object_name = 'CONT'
      2  /
    LAST_DDL_TIME
    24-JAN-2005 21:10:17
    scott@ORA92> SELECT * FROM cc_contenidos WHERE CONTAINS (cvalor, 'test') > 0
      2  /
    CVALOR
    test 2
    test 1
    scott@ORA92>

  • Help with dynamic creation of class object names

    Hi all
    Wonder if you can help. I have a class player.java. I want to be able to create objects from this class depending on a int counter variable.
    So, for example,
    int counter = 1;
    Player p+counter = new Player ("Sam","Smith");the counter increments by 1 each time the method this sits within is called. The syntax for Player name creation is incorrect. What I am looking to create is Player p1, Player p2, Player p3.... depending on value of i.
    Basically I think this is just a question of syntax, but I can't quite get there.
    Please help if you can.
    Thanks.
    Sam

    here is the method:
    //add member
      public void addMember() {
        String output,firstName,secondName,address1,address2,phoneNumberAsString;
        long phoneNumber;
        boolean isMember=true;
        this.memberCounter++;
        Player temp;
        //create HashMap
        HashMap memberList = new HashMap();
        output="Squash Court Booking System \n";
        output=output+"Enter Details \n\n";
        firstName=askUser("Enter First Name: ");
        secondName=askUser("Enter Second Name: ");
        address1=askUser("Enter Street Name and Number: ");
        address2=askUser("Enter Town: ");
        phoneNumberAsString=askUser("Enter Phone Number: ");
        phoneNumber=Long.parseLong(phoneNumberAsString);
        Player p = new Player(firstName,secondName,address1,address2,phoneNumber,isMember);
        //place member into HashMap
        memberList.put(new Integer(memberCounter),p);
        //JOptionPane.showMessageDialog(null,"Membercounter="+memberCounter,"Test",JOptionPane.INFORMATION_MESSAGE);
        //create iterator
        Iterator members = memberList.values().iterator();
        //create output
        output="";
        while(members.hasNext()) {
          temp = (Player)members.next();
          output=output + temp.getFirstName() + " ";
          output=output + temp.getSecondName() + "\n";
          output=output + temp.getAddress1() + "\n";
          output=output + temp.getAddress2() + "\n";
          output= output + temp.getPhoneNumber() + "\n";
          output= output + temp.getIsMember();
        //display message
        JOptionPane.showMessageDialog(null,output,"Member Listings",JOptionPane.INFORMATION_MESSAGE);
      }//end addMemberOn running this, no matter how many details are input, the HashMap only gives me the first one back....
    Any ideas?
    Sam

  • Need Urgent Help with trigger in Oracle 10g

    Hello frd,
    I am working on my DBMS Project in VB 6.0 that is Tollbooth management system
    i have to insert one trigger for my project so i had decided to insert time trigger.
    I have total 3 table UserLogin, Vehice and Vehicle_Data
    the 3rd table Vehicle data contain the following fields
    Vehicle_Type, Vehicle_No, Tax_Time, Source, Destination and Tax
    Now i had done coding for tax when you select Vehicle Type, Source and Destination the Tax Field will automatically fillup and all the data will Saved in Oracle table but now my problem is that i want to create trigger for Tax_Time column When any new data inserted current time will stored in that column
    I had create one but it gives error
    create trigger time after insert on vehicle_Data
    for each row
    begin
    insert into Vehicle_Data(Tax_Time) values(to_char(sysdate, 'HH:MI:SSAM DD_MON_YYYY'));
    end;
    Note: I am Using VB 6.0 and Oracle 10g Express Edition

    I had create one but it gives errorWelcome to the forum and many many thanks for not posting the full error message, that is really helpful, since we're all a 100% sure what's going on now (yes, that was ironic ;) ).
    Let me guess: a mutating table error?
    Read:
    http://www.oracle-base.com/articles/9i/MutatingTableExceptions.php
    http://asktom.oracle.com/pls/asktom/ASKTOM.download_file?p_file=6551198119097816936
    But before that, actually you should read:
    http://tkyte.blogspot.com/2005/06/how-to-ask-questions.html

  • Need help with trigger for whitespace and caps validation

    I need to create a table trigger that will generate an error whenever a specific column does not contain all caps or has whitespace when records are either inserted or updated. I'm new to writing SQL, so any help is appreciated!

    In 10g
    SQL> create or replace trigger trigg_sample
      2  before update or insert on sample
      3  for each row
      4  declare
      5  lv_pos number;
      6  begin
      7  select regexp_instr(:new.col1,'[a-z|( )]') into lv_pos from dual;
      8  if lv_pos > 0 then
      9  raise_application_error(20000,'The column contains lowercase or white space characters');
    10  end if;
    11  end;
    12  /
    Trigger created.
    SQL> desc sample;
    Name                                      Null?    Type
    COL1                                               VARCHAR2(20)
    SQL> insert into sample values('DFD') ;
    1 row created.
    SQL> insert into sample values('dfdfd') ;
    insert into sample values('dfdfd')
    ERROR at line 1:
    ORA-21000: error number argument to raise_application_error of 20000 is out of
    range
    ORA-06512: at "XLS_ADMIN.TRIGG_SAMPLE", line 6
    ORA-04088: error during execution of trigger 'XLS_ADMIN.TRIGG_SAMPLE'
    SQL> insert into sample values('DFDF ') ;
    insert into sample values('DFDF ')
    ERROR at line 1:
    ORA-21000: error number argument to raise_application_error of 20000 is out of
    range
    ORA-06512: at "XLS_ADMIN.TRIGG_SAMPLE", line 6
    ORA-04088: error during execution of trigger 'XLS_ADMIN.TRIGG_SAMPLE'
    SQL>

  • Trigger Creation Error in Migration

    During the migration process from an Access 2000 db to Oracle 8i, a number of triggers are created to replace Validation Rules on fields in the Access Tables (eg >0 And <Now()). However, the trigger at migration time is created with a call to a function CONV_TO_DATE. As you can imagine, this creates an error as there is no function of this name. I get a no variable of this name declared. All I do is delete the "CONV_" and it works a treat. What is going on?
    Along the same lines, some other Validation Triggers are created with a duplicate field name in the statement eg "IF NOT (:ois.field1 AS :ois.field1 < 0)". Another, can you help?
    Thanks Barb

    Make sure that you have the same version of the ADF libraries that you use inside JDeveloper installed on your server. You can use the ADF installer to install them on the server.

  • Help required:Spool Creation for posted document in FB03 transaction

    Hi Experts,
    The requirement is like I have to send the PDF document to the user by mail once the document gets posted in SAP ECC. The posting is taking place by IDOC.
    The problem is how do i get the spool request for the document which is posted in ECC. It can be seen by entering document number in FB03 transaction but there is no smart form or SAP script or any Output type. The document is posted by IDOC.The client wants the PDF document excatly as seen from FB03 transaction. Please help as this is typical requirement i have never come across.
    Do let me know some of the user exits where in just after the posting i can write my code for spool creation. The idoc is using the BAPI_ACC_DOCUMENT_POST.

    HI
    In test mode i am able to view the document no. but not the reference document no and when double click on the document no i am not able to view the journal entry.
    Thanks.

  • Help for user creation for Webshop

    Hi ,
    I am working on SAP CRM 2007 Ecommerce. I want to log into the webshop.
    Please help me with the procedure for creation of users to log into the webshop.
    Regards,
    Sumit

    Hi Sumit,
    I think it should be the same one for shopadmin/admin/xcm/init.do, XCM user.
    The XCM user is the J2EE visual admin user. J2EE guys know how to create this user based on relevent document, and this has to be done on J2EE server. :P
    Usually, the default user is Administrator with password blank. It maight be different for each J2EE version.
    Hongyan

Maybe you are looking for

  • Calling sap transaction in webdynpro

    hi friends, can any body provide the solution how to call the standard transaction like va02 or .any . in Web dynpro abap. thanks in advance. sai.

  • Itunes library.itl can't be opened

    when i want to open itunes, the messages "itunes library.itl can't be opned since it had been configuered by a newer itunes version (or similar, it's written in German) does anybody know anything about this?

  • Out Box doesn't show

    My out Box does not show when i send mail of any length. Any ideas? Doug

  • Active-Passive Failover cluster in Windows Server 2008 R2

    Hi, As per the client requirements, I build an active-passive Oracle 11g R2 database cluster in Windows Server 2008 R2. (Used Microsoft cluster as Client don't have Fail Safe licence) As per the configuration, I follow the below mentioned steps: a)OS

  • ITunes 11.0.5 not showing music folder files

    Where to begin? Over the years, my music folder (approx 200gb) became a mess; approx 1/3 "missing" from iTunes, dozens of artists files somehow stashed in other artist files (all my Stones, for instance, was in the Ella Fitzgerald folder... why, who