Error on compliling a trigger

Hi,
I have a table INT_PRODUCT_HIST which is in INT schema. There a trigger, say A, which has a variable of type INT_PRODUCT_HIST.PRODUCT_CONFIG_TXT%type defined in it's declare block.
On compiling this trigger in the INT schema I get the following error
LINE/COL ERROR
30/33 PLS-00201: identifier 'INT_PRODUCT_HIST.PRODUCT_CONFIG_TXT' must
be declared
31/4 PL/SQL: Item ignored
The table has a PUBLIC synonym and ALL privileges are given to PUBLIC on this table. Also this package is existing only in this schema which I check by a SELECT statement on ALL_OBJECTS.
I'm able to run all DML statements on this table. I'm using Oracle 8.1.7 on HP-UX
The table description is as under --
SQL> desc int.int_product_hist
Name Null? Type
PRODUCT_INSTANCE_ID NOT NULL NUMBER(12)
PRODUCT_ID NOT NULL VARCHAR2(36)
PRODUCT_REV_ID NOT NULL VARCHAR2(5)
PRODUCT_REV_DT DATE
PRODUCT_CONFIG_TXT CLOB
TIMESTAMP DATE
ENG_AUTH_NM NOT NULL VARCHAR2(12)
Below is the declaration block code where the variable is declared.
create or replace trigger pdm_api_l1.pdm30_BENGPRT
before insert
or update of BAPPROVALTIMESTAMP
,BDESIGNATEDPART
,BMINUMBER
on pdm_api_l1.BENGPRT
for each row
DECLARE
intCount number;
varProducts int_product_hist.product_config_txt%type;
BEGIN
The trigger is on a table BENGPRT which is in PDM_API_L1 schema. I'm able to access the INT_PRODUCT_HIST table from PDM_API_L1 schema. Also I'm able to access BENGPRT table from INT schema.
Does anybody have an idea on what the problem could be?
Regards,
Milton.

Hi,
The table did have a direct privileges.
I have solved my problem by dropping the synonym and recreating it. I'm not sure how it made a difference, could somebody explain that?
Infact before, I tried recreating the synonym but it did not work.
Regards,
Milton.

Similar Messages

  • Error creating job into trigger using DBMS_SCHEDULER.

    Hi,
    I am trying to create job using dbms_scheduler package. I have one trigger on insert event on one table. I am creating job using following syntax.
    CREATE OR REPLACE TRIGGER TRG_BI_JOB_CONFIG BEFORE INSERT ON JOB_CONFIG FOR EACH ROW
    DECLARE
    BEGIN
         DBMS_SCHEDULER.Create_Job(job_name => 'my_job1'
                             ,job_type => 'PLSQL_BLOCK'
                             ,job_action => 'delete_temp'
                             ,start_date => TO_DATE('15-JUL-2003 1:00:00 AM', 'dd-mon-yyyy hh:mi:ss PM')
                                  ,repeat_interval => 'FREQ=DAILY'
                             ,enabled => TRUE
                             ,comments => 'DELETE FOR job schedule.');
    EXCEPTION
    WHEN OTHERS THEN RAISE;
    END;
    but I am getting following error while inserting into JOB_CONFIG table.
    ORA-04092: cannot in a trigger
    ORA-06512: at "PRAKASH1.TRG_BI_JOB_CONFIG", line 41
    ORA-04088: error during execution of trigger
    same above statement If I am running from sqlplus then It is creating job without error. If I am creating job using DBMS_JOB into trigger then It is also working fine but this package is depricated from oracle10g so I cannt use it any more.
    My Oracle version is 'Oracle DATABASE 10g RELEASE 10.2.0.1.0 - Production'.
    can anyone help me in this context.

    I have a few comments on this thread as an Oracle dbms_scheduler developer.
    - Oracle takes backward compatibility very seriously. Although dbms_job is deprecated, the interface will continue to work indefinitely. The deprecation of dbms_job is so that customers will be encouraged to take advantage of the more powerful dbms_scheduler. It is extremely unlikely that entire blocks of functionality will ever be removed. There is currently no plan to remove dbms_job functionality (and even if there were, doing so would be strenuously opposed by many users).
    - lots of internal Oracle database components are standardizing on using dbms_scheduler (resource manager, materialized views, auto sql tuning etc). This is good evidence that it will continue to be the recommended scheduling method for the foreseeable future - not even the concept of a replacement exists. It is also under active development.
    - The reason for the automatic commit is that a dbms_scheduler job is a full database object like a stored procedure or a table. So a call to dbms_scheduler.create_job is like executing a DDL which takes effect immediately. A dbms_job job is mostly just a row in a table so a call to dbms_job.submit behaves like regular DML. There are many advantages to a job being a full database object but DDL behaviour is an unfortunate requirement of this.
    Hope this clears a few things up, reply with any questions.
    -Ravi

  • Error in creating a trigger

    i am creating a trigger i am getting an error
    create or replace TRIGGER INS_Discharge
    AFTER INSERT
    ON Discharge
    FOR EACH ROW
    AS
    declare
    vr_DischargeType INT ;
    vr_Visit_ID INT ;
    vr_Discharge_Date DATE;
    vr_VisitDate DATE;
    vr_AdmTime varchar(5) ;
    vr_TransferID INT ;
    vr_BedID AS INT ;
    BEGIN
    select :NEW.DischargeType into vr_DischargeType
    from dual;
    select :NEW.Discharge_Date into vr_Discharge_Date
    from dual;
    select :NEW.VisitDate into vr_VisitDate
    from dual;
    SELECT VisitDate into vr_VisitDate FROM Visit WHERE Visit_ID = vr_Visit_ID ;
    UPDATE Visit SET DischargeType = vr_DischargeType, DischargeDate = vr_Discharge_Date
    WHERE Visit_ID = vr_Visit_ID ;
    SELECT MAX(Transfer_ID)into vr_TransferID FROM BedSchedule WHERE VisitID = vr_Visit_ID ;
    IF vr_DischargeType = 2 then
    SELECT Bed_ID into vr_BedID FROM BedSchedule WHERE Transfer_ID = vr_TransferID ;
    UPDATE Bed_Mst SET Bed_Status_ID = 1 WHERE Bed_ID = vr_BedID ;
    :NEW.Bed_ID :=vr_BedID;
    end if;
    END ;
    Error report:
    ORA-04079: invalid trigger specification
    04079. 00000 - "invalid trigger specification"
    *Cause:    The create TRIGGER statement is invalid.
    *Action:   Check the statement for correct syntax.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    i have done you said .... i have oracle version 10g
    create or replace TRIGGER trUPD_Discharge
    AFTER UPDATE
    ON Discharge
    for each row
    AS
    declare
    vr_DischargeType INT ;
    vr_Discharge_Date DATE;
    vr_Visit_ID INT ;
    vr_CancelStatus INt;
    BEGIN
    /*select :NEW.DischargeType into vr_DischargeType from dual;
    select :NEW.Visit_ID into vr_Visit_ID from dual;
    select :NEW.Discharge_Date into vr_Discharge_Date from dual;
    select nvl((select :NEW.CancelStatus from dual),0)
    into vr_CancelStatus from dual;
    If vr_CancelStatus = 0 then
    UPDATE Visit SET DischargeType = :NEW.DischargeType,
    DischargeDate =:NEW.Discharge_Date WHERE Visit_ID = :NEW.Visit_ID ;
    end if;
    END;
    but still getting same error
    Error report:
    ORA-04079: invalid trigger specification
    04079. 00000 - "invalid trigger specification"
    *Cause:    The create TRIGGER statement is invalid.
    *Action:   Check the statement for correct syntax.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Error in executing a trigger

    Hi
    I'm studying Oracle on db10g xe. it comes with default db (hr) and also with on line tutorial which is my starting point.
    I was studying trigger with example on EMPLOYEES table that is in tutorial and it's like this:
    CREATE OR REPLACE TRIGGER "SECURE_EMP"
    BEFORE INSERT OR DELETE OR UPDATE ON EMPLOYEES
    FOR EACH ROW
    BEGIN
    IF TO_CHAR('SYSDATE','DY') IN ('SAT','SUN') OR
    TO_CHAR('SYSDATE','HH24') NOT BETWEEN '08' AND '18' THEN
    IF DELETING THEN RAISE_APPLICATION_ERROR(-20502,'You may delete from EMPLOYEES table'||
    'only during business hours.');
    ELSIF INSERTING THEN RAISE_APPLICATION_ERROR(-20500,'You may insert into EMPLOYEES table'||
    'only during business hours.');
    ELSIF UPDATING('SALARY') THEN RAISE_APPLICATION_ERROR(-20503, 'You may update SALARY'||
    'only during business hours.');
    ELSE RAISE_APPLICATION_ERROR(-20504,'You may work with EMPLOYEES table'||
    'during normal business hours only.');
    END IF;
    END IF;
    END;
    it's listed as healthy trigger with now error and when i click on trigger name i go to the page the shows all the detail and it's all normal with no error an anything abnormal.
    but when i try to test the trigger implementation with DML (delete,update,insert) i get the following error:
    ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    ORA-06512: at "SHAWN_DB_ADMIN.SECURE_EMP", line 2
    ORA-04088: error during execution of trigger 'SHAWN_DB_ADMIN.SECURE_EMP'
    1. delete from employees where department_id=90
    I spent 2 hours and went through each line and syntax but couldn't figure why?
    Please let me what's wrong.
    the both table creation and trigger code are come as build in part of db10g xe but when i run it it won't work.
    Please help.
    thanks

    You should not quote sysdate so it should be like
    CREATE OR REPLACE TRIGGER "SECURE_EMP"
    BEFORE INSERT OR DELETE OR UPDATE ON EMPLOYEES
    FOR EACH ROW
    BEGIN
    IF upper(substr(to_char(sysdate,'Day'),1,3)) IN ('SAT','SUN') OR
    TO_CHAR(SYSDATE,'HH24') NOT BETWEEN '08' AND '18' THEN
    IF DELETING THEN RAISE_APPLICATION_ERROR(-20502,'You may delete from EMPLOYEES table'||
    'only during business hours.');
    ELSIF INSERTING THEN RAISE_APPLICATION_ERROR(-20500,'You may insert into EMPLOYEES table'||
    'only during business hours.');
    ELSIF UPDATING('SALARY') THEN RAISE_APPLICATION_ERROR(-20503, 'You may update SALARY'||
    'only during business hours.');
    ELSE RAISE_APPLICATION_ERROR(-20504,'You may work with EMPLOYEES table'||
    'during normal business hours only.');
    END IF;
    END IF;
    END;

  • Pl/Sql Error while creating a trigger

    Hello everyone m trying to make a trigger whose purpose is not to allow any update insert or delete to be done on the table Work if the day is sunday.I tried this code but it is giving me error
    create or replace trigger No_work_on_Sunday
    After insert or update or delete
    on Work When owner='MAX'
    for each row
    begin
            if (select to_char(sysdate,'D')=1) then
                     raise_application_error(-20001,'no work on sunday');
          end if;
    end;
    on Work when owner='MAX'
    ERROR at line 3:
    ORA-04077: WHEN clause cannot be used with table level triggers Pls help
    Edited by: 781207 on Jul 16, 2010 7:43 AM

    create or replace trigger No_work_on_Sunday
    before insert or update or delete
    for each row
    on Work When owner='MAX'
    begin
            if to_char(sysdate,'D')=1 then
                     raise_application_error(-20001,'no work on sunday');
          end if;
    end;
    /Keep in mind to_char(sysdate,'D')=1 is NLS dependent. In US week starts Sunday in most european some coutries week starts Monday. In middle east it can be Friday or Saturday...
    SY.
    Edited by: Solomon Yakobson on Jul 16, 2010 7:50 AM

  • ORA-04088: error during execution of trigger

    Error Description :
    We have more than 100 of records in a csv file which we are processing through a script. At the first execution let
    say it generates trigger exception for five records ... when I execute the script second time those five records
    are not throwing any exception but may be some other records. But consecutive trigger exception is not happening for any record . If a particular record is throwing exception at first attempt then in the second attempts it's not throwing the trigger exception.
    Input file
    PROPRTY_ID,NAME,OLD STREET,CITY,STATE,ZIP,NEW STREET,NEW CITY,NEW STATE,NEW ZIP
    88527091,SAM PAUL SUMMU ,1061 XYZ,CITY1,ST,95626,5512 XX YY ZZ,TOWN,PA,12345-9812
    Error :
    88527091,SAM PAUL SUMMU ,1061 XYZ,CITY1,ST,95626,5512 XX YY ZZ,TOWN,PA,12345-9812 - PROPERTY Update Error : ORA-00001: unique constraint (PROD.PK_AUDIT_LOG) violated
    ORA-06512: at "PROD.PROPERTY_AUD", line 159
    ORA-04088: error during execution of trigger 'PROD.PROPERTY_AUD'
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> desc property
    Name                                      Null?    Type
    PROPERTY_ID                               NOT NULL NUMBER(20)
    TYPE_CODE                                          VARCHAR2(10)
    TYPE_PREFIX                                        VARCHAR2(10)
    DWELLING_TYPE_CODE                        NOT NULL VARCHAR2(10)
    DWELLING_TYPE_PREFIX                      NOT NULL VARCHAR2(10)
    STREET_NUMBER                                      VARCHAR2(25)
    STREET_DIRECTION                                   CHAR(2)
    STREET_NAME                               NOT NULL VARCHAR2(45)
    UNIT_NUMBER                                        VARCHAR2(15)
    CITY_CODE                                          VARCHAR2(10)
    STATE                                     NOT NULL CHAR(2)
    ZIP_CODE                                           VARCHAR2(10)
    UNIT_TYPE                                          VARCHAR2(10)
    UNIT_PREFIX                                        VARCHAR2(10)
    COUNTY_CODE                                        VARCHAR2(10)
    COUNTRY_CODE                              NOT NULL VARCHAR2(10)
    SQUARE_FEET                                        NUMBER(6)
    NUMBER_MOTHER_LAW_UNITS                            NUMBER(6)
    YEAR_BUILT                                         DATE
    PROPERTY_VALUE                                     NUMBER(12)
    ZIP_PLUS_4                                         VARCHAR2(4)
    SFI_REQ_FLAG                                       CHAR(1)
    LAST_MODIFIED                             NOT NULL DATE
    LAST_MODIFIED_BY                                   VARCHAR2(31)
    STANDARDIZED_STATUS                                VARCHAR2(10)
    STANDARDIZED_DESC                                  VARCHAR2(200)
    SQL> desc audit_log
    Name                                      Null?    Type
    SEQ_NO                                    NOT NULL NUMBER(20)
    TABLE_NAME                                         VARCHAR2(31)
    USER_STAMP                                         VARCHAR2(31)
    TIME_STAMP                                         DATE
    TRAN_CODE                                          CHAR(2)
    RECORD1                                            VARCHAR2(2000)
    RECORD2                                            VARCHAR2(2000)
    FLAG_FLD                                           CHAR(1)
    SFI_FLAG_FLD                                       CHAR(1)
    ERROR_NUMBER                                       NUMBER
    Update Query which is getting executed :
    UPDATE PROPERTY
    SET DWELLING_TYPE_CODE = 'SFR',
    DWELLING_TYPE_PREFIX = 'DWELLING',
    STREET_NUMBER = NULL,
    STREET_DIRECTION = NULL,
    STREET_NAME = ln_new_street_name,       -- <From input file>
    UNIT_NUMBER = NULL,
    CITY_CODE = ln_city_code,               -- <From other Table>
    STATE = ln_new_state,                   -- <From input file>
    ZIP_CODE = ln_new_zip_code,
    UNIT_TYPE = NULL,
    UNIT_PREFIX = NULL,
    COUNTY_CODE = ln_county_code,           -- <From Other table>
    COUNTRY_CODE = 1,
    ZIP_PLUS_4 = ln_zip_plus_4            -- <From Input file>
    WHERE PROPERTY_ID = ln_property_id;   -- <From Other table>
    *NOTE :* Property.LAST_MODIFIED field is auto populate through other trigger. It does not causing any problem.
    This might be helpful :
    SQL> select OWNER, CONSTRAINT_NAME, TABLE_NAME,COLUMN_NAME from dba_cons_columns where CONSTRAINT_NAME='PK_AUDIT_LOG';
    OWNER                          CONSTRAINT_NAME                TABLE_NAME  COLUMN_NAME
    PROD                           PK_AUDIT_LOG                   AUDIT_LOG          SEQ_NO
    PROD_ARCH                      PK_AUDIT_LOG                   AUDIT_LOG          SEQ_NO
    SQL> select SEQ_NO, trim(RECORD1), trim(RECORD2),TIME_STAMP
    from audit_log where RECORD1 like '%BUTTE%' order by  TIME_STAMP;
    SEQ_NO
    1675677212
    TRIM(RECORD1)
    00000000000031814095...SFR       .DWELLING  ...5512 BUTTE VIEW CT                           ..15532
        .CA.95765     ...1377      .1         .....5000..20100922.SUSMSAHA                       ..
    TRIM(RECORD2)
    00000000000031814095...SFR       .DWELLING  ...5512 BUTTE VIEW CT                           ..15532
        .CA.95765     ...1377      .1         .....5000..20100922.SUSMSAHA                       ..
    TIME_STAMP
    22-sep-2010
    Trigger Body which is fired and throwing the exception :
    create or replace trigger PROPERTY_AUD
    before insert or update on PROPERTY
    for each row
    declare
    rec1            varchar2(2000);
    rec2            varchar2(2000);
    tcode           char(1);
    ln_seq_id       NUMBER:=Null;
    ls_sql  VARCHAR2(2000):=Null;
    begin
    select temp_audit_seq.nextval into ln_seq_id from dual;
    rec1 := null;
    rec2 := null;
         if user = 'NONREP_USER' then
            return;
         end if;
         if (dbms_reputil.from_remote = FALSE) then
              :NEW.last_modified := sysdate;
              if (user = 'SALESFORCE_SYNC') then
                      :new.last_modified_by := NVL(:new.last_modified_by,USER);
              else
                   :new.last_modified_by := user;
              end if;
         end if;
    if inserting then
    rec1 :=
    LPAD(:new.PROPERTY_ID, 20, '0' ) || '.' ||
    RPAD(:new.TYPE_CODE, 10, ' ' ) || '.' ||
    RPAD(:new.TYPE_PREFIX, 10, ' ' ) || '.' ||
    RPAD(:new.DWELLING_TYPE_CODE, 10, ' ' ) || '.' ||
    RPAD(:new.DWELLING_TYPE_PREFIX, 10, ' ' ) || '.' ||
    RPAD(:new.STREET_NUMBER, 25, ' ' ) || '.' ||
    RPAD(:new.STREET_DIRECTION, 2, ' ' ) || '.' ||
    RPAD(:new.STREET_NAME, 45, ' ' ) || '.' ||
    RPAD(:new.UNIT_NUMBER, 15, ' ' ) || '.' ||
    RPAD(:new.CITY_CODE, 10, ' ' ) || '.' ||
    RPAD(:new.STATE, 2, ' ' ) || '.' ||
    RPAD(:new.ZIP_CODE, 10, ' ' ) || '.' ||
    RPAD(:new.UNIT_TYPE, 10, ' ' ) || '.' ||
    RPAD(:new.UNIT_PREFIX, 10, ' ' ) || '.' ||
    RPAD(:new.COUNTY_CODE, 10, ' ' ) || '.' ||
    RPAD(:new.COUNTRY_CODE, 10, ' ' ) || '.' ||
    LPAD(:new.SQUARE_FEET, 6, '0' ) || '.' ||
    LPAD(:new.NUMBER_MOTHER_LAW_UNITS, 6, '0' ) || '.' ||
    TO_CHAR(:new.YEAR_BUILT, 'YYYYMMDD') || '.' ||
    LPAD(:new.PROPERTY_VALUE, 12, '0' ) || '.' ||
    RPAD(:new.ZIP_PLUS_4, 4, ' ' ) || '.' ||
    RPAD(:new.SFI_REQ_FLAG, 1, ' ' ) || '.' ||
    TO_CHAR(:new.LAST_MODIFIED, 'YYYYMMDD') || '.' ||
    RPAD(:new.LAST_MODIFIED_BY, 31, ' ' ) || '.' ||
    RPAD(:new.STANDARDIZED_STATUS, 10, ' ' ) || '.' ||
    RPAD(:new.STANDARDIZED_DESC, 200, ' ' );
    tcode := 'I';
    elsif deleting then
    rec1 :=
    LPAD(:new.PROPERTY_ID, 20, '0' ) || '.' ||
    RPAD(:new.TYPE_CODE, 10, ' ' ) || '.' ||
    RPAD(:new.TYPE_PREFIX, 10, ' ' ) || '.' ||
    RPAD(:new.DWELLING_TYPE_CODE, 10, ' ' ) || '.' ||
    RPAD(:new.DWELLING_TYPE_PREFIX, 10, ' ' ) || '.' ||
    RPAD(:new.STREET_NUMBER, 25, ' ' ) || '.' ||
    RPAD(:new.STREET_DIRECTION, 2, ' ' ) || '.' ||
    RPAD(:new.STREET_NAME, 45, ' ' ) || '.' ||
    RPAD(:new.UNIT_NUMBER, 15, ' ' ) || '.' ||
    RPAD(:new.CITY_CODE, 10, ' ' ) || '.' ||
    RPAD(:new.STATE, 2, ' ' ) || '.' ||
    RPAD(:new.ZIP_CODE, 10, ' ' ) || '.' ||
    RPAD(:new.UNIT_TYPE, 10, ' ' ) || '.' ||
    RPAD(:new.UNIT_PREFIX, 10, ' ' ) || '.' ||
    RPAD(:new.COUNTY_CODE, 10, ' ' ) || '.' ||
    RPAD(:new.COUNTRY_CODE, 10, ' ' ) || '.' ||
    LPAD(:new.SQUARE_FEET, 6, '0' ) || '.' ||
    LPAD(:new.NUMBER_MOTHER_LAW_UNITS, 6, '0' ) || '.' ||
    TO_CHAR(:new.YEAR_BUILT, 'YYYYMMDD') || '.' ||
    LPAD(:new.PROPERTY_VALUE, 12, '0' ) || '.' ||
    RPAD(:new.ZIP_PLUS_4, 4, ' ' ) || '.' ||
    RPAD(:new.SFI_REQ_FLAG, 1, ' ' ) || '.' ||
    TO_CHAR(:new.LAST_MODIFIED, 'YYYYMMDD') || '.' ||
    RPAD(:new.LAST_MODIFIED_BY, 31, ' ' ) || '.' ||
    RPAD(:new.STANDARDIZED_STATUS, 10, ' ' ) || '.' ||
    RPAD(:new.STANDARDIZED_DESC, 200, ' ' );
    tcode := 'D';
    else
    rec1 :=
    LPAD(:old.PROPERTY_ID, 20, '0' ) || '.' ||
    RPAD(:old.TYPE_CODE, 10, ' ' ) || '.' ||
    RPAD(:old.TYPE_PREFIX, 10, ' ' ) || '.' ||
    RPAD(:old.DWELLING_TYPE_CODE, 10, ' ' ) || '.' ||
    RPAD(:old.DWELLING_TYPE_PREFIX, 10, ' ' ) || '.' ||
    RPAD(:old.STREET_NUMBER, 25, ' ' ) || '.' ||
    RPAD(:old.STREET_DIRECTION, 2, ' ' ) || '.' ||
    RPAD(:old.STREET_NAME, 45, ' ' ) || '.' ||
    RPAD(:old.UNIT_NUMBER, 15, ' ' ) || '.' ||
    RPAD(:old.CITY_CODE, 10, ' ' ) || '.' ||
    RPAD(:old.STATE, 2, ' ' ) || '.' ||
    RPAD(:old.ZIP_CODE, 10, ' ' ) || '.' ||
    RPAD(:old.UNIT_TYPE, 10, ' ' ) || '.' ||
    RPAD(:old.UNIT_PREFIX, 10, ' ' ) || '.' ||
    RPAD(:old.COUNTY_CODE, 10, ' ' ) || '.' ||
    RPAD(:old.COUNTRY_CODE, 10, ' ' ) || '.' ||
    LPAD(:old.SQUARE_FEET, 6, '0' ) || '.' ||
    LPAD(:old.NUMBER_MOTHER_LAW_UNITS, 6, '0' ) || '.' ||
    TO_CHAR(:new.YEAR_BUILT, 'YYYYMMDD') || '.' ||
    LPAD(:old.PROPERTY_VALUE, 12, '0' ) || '.' ||
    RPAD(:old.ZIP_PLUS_4, 4, ' ' ) || '.' ||
    RPAD(:old.SFI_REQ_FLAG, 1, ' ' ) || '.' ||
    TO_CHAR(:new.LAST_MODIFIED, 'YYYYMMDD') || '.' ||
    RPAD(:old.LAST_MODIFIED_BY, 31, ' ' ) || '.' ||
    RPAD(:old.STANDARDIZED_STATUS, 10, ' ' ) || '.' ||
    RPAD(:old.STANDARDIZED_DESC, 200, ' ' );
    rec2 :=
    LPAD(:new.PROPERTY_ID, 20, '0' ) || '.' ||
    RPAD(:new.TYPE_CODE, 10, ' ' ) || '.' ||
    RPAD(:new.TYPE_PREFIX, 10, ' ' ) || '.' ||
    RPAD(:new.DWELLING_TYPE_CODE, 10, ' ' ) || '.' ||
    RPAD(:new.DWELLING_TYPE_PREFIX, 10, ' ' ) || '.' ||
    RPAD(:new.STREET_NUMBER, 25, ' ' ) || '.' ||
    RPAD(:new.STREET_DIRECTION, 2, ' ' ) || '.' ||
    RPAD(:new.STREET_NAME, 45, ' ' ) || '.' ||
    RPAD(:new.UNIT_NUMBER, 15, ' ' ) || '.' ||
    RPAD(:new.CITY_CODE, 10, ' ' ) || '.' ||
    RPAD(:new.STATE, 2, ' ' ) || '.' ||
    RPAD(:new.ZIP_CODE, 10, ' ' ) || '.' ||
    RPAD(:new.UNIT_TYPE, 10, ' ' ) || '.' ||
    RPAD(:new.UNIT_PREFIX, 10, ' ' ) || '.' ||
    RPAD(:new.COUNTY_CODE, 10, ' ' ) || '.' ||
    RPAD(:new.COUNTRY_CODE, 10, ' ' ) || '.' ||
    LPAD(:new.SQUARE_FEET, 6, '0' ) || '.' ||
    LPAD(:new.NUMBER_MOTHER_LAW_UNITS, 6, '0' ) || '.' ||
    TO_CHAR(:new.YEAR_BUILT, 'YYYYMMDD') || '.' ||
    LPAD(:new.PROPERTY_VALUE, 12, '0' ) || '.' ||
    RPAD(:new.ZIP_PLUS_4, 4, ' ' ) || '.' ||
    RPAD(:new.SFI_REQ_FLAG, 1, ' ' ) || '.' ||
    TO_CHAR(:new.LAST_MODIFIED, 'YYYYMMDD') || '.' ||
    RPAD(:new.LAST_MODIFIED_BY, 31, ' ' ) || '.' ||
    RPAD(:new.STANDARDIZED_STATUS, 10, ' ' ) || '.' ||
    RPAD(:new.STANDARDIZED_DESC, 200, ' ' );
    tcode := 'U';
    end if;
    ls_sql :='
    INSERT INTO AUDIT_LOG
    ( seq_no,
    table_name,
    user_stamp,
    time_stamp,
    tran_code,
    record1,
    record2)
    VALUES
    ( :id,
    :s_table_name,
    :s_user_name,
    :d_sysdate,
    :s_tcode,
    :s_rec1,
    :s_rec2
    EXECUTE IMMEDIATE ls_sql
    USING ln_seq_id,
    'PROPERTY',
    user,
    sysdate,
    tcode,
    rec1,
    rec2;
    end;
    Your suggestion is highly appreciated ..
    Edited by: Bipul on Sep 23, 2010 12:40 AM

    TEMP_AUDIT_SEQ generates number with the increment of +1
    Although there seems other sequence populating the AUDIT_LOG table through a different sequence with the increment of +10. So till now there are already 1179 different numbers residing in audit_log.seq_no and yet to be generated by the TEMP_AUDIT_SEQ sequence. I will look into more details.
    SQL> select max(seq_no) from audit_log;
    MAX(SEQ_NO)
    1675689121
    SQL> select TEMP_AUDIT_SEQ.nextval from dual;
       NEXTVAL
    1675677285
    SQL> select count(*) From audit_log where seq_no>1675677285;
      COUNT(*)
          1179
    SQL> select count(*) from audit_log where seq_no>1675677283 and mod(seq_no,2)=1;
      COUNT(*)
          1179
    SQL> select seq_no from audit_log where seq_no>1675677283 and mod(seq_no,2)=1 and rownum<12;
        SEQ_NO
    1675677291
    1675677301
    1675677311
    1675677321
    1675677331
    1675677341
    1675677351
    1675677361
    1675677371
    1675677381
    1675677391
    11 rows selected.
    Thank you Lee and  Herald ten Dam   ...

  • Export release build failed with an error message: complilation failed while excuting : compile-abc

    I updated air sdk from 4.0 to 16.0 beta to fix apple app store submitting bug. I can build the project and run it on simulator without any problem.  But when I tried to export the ios release build, I got this error message: complilation failed while excuting : compile-abc. 
    I use commmand line to excute compile-abc.exe with the parameters that adt gives it, but it failed without any error message.
    Here is the command line:
    compile-abc.exe -mtriple=armv7-apple-ios -filetype=obj -sdk "C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.5\sdks\4.5.1 - air16\lib\aot/lib/avmglue.abc" -fields "C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.5\sdks\4.5.1 - air16\lib\aot/lib/air-fields.arm-air.txt" -O3 -abc-file-list=E:\MyApp\bin-debug\AOTBuildOutput8184169967790207636.tmp\ABCFilesList.txt
    There's a empty file AOTBuildOutput-0000001821_1821.o left in the command line workaroud path. I opened file AOTBuildOutput-0000001821.abc, but didn't get any clue. How can I trace this problem?

    Still having similar issues - seems to be when I embed an image - but works for every release except for release build
    Tried your work around but doesnt seem to make a different
    [Embed(source = "/../assets/[email protected]")]
    protected static const ATLAS_IMAGE:Class;
    [Embed(source = "/../assets/[email protected]", mimeType = "application/octet-stream")]
    protected static const ATLAS_XML:Class;
    [Embed(source = "/../assets/iconMap.png")]
    protected static const ATLAS_IMAGE_LOW_RES:Class;
    [Embed(source = "/../assets/iconMap.xml", mimeType = "application/octet-stream")]
    protected static const ATLAS_XML_LOW_RES:Class;
    if(Starling.current.viewPort.width > 320)
    atlas = new TextureAtlas(Texture.fromBitmap(new ATLAS_IMAGE(), false), XML(new ATLAS_XML()));   
    }else{
    atlas = new TextureAtlas(Texture.fromBitmap(new ATLAS_IMAGE_LOW_RES(), false), XML(new ATLAS_XML_LOW_RES()));

  • Errore ORA-04098 creating Trigger.

    hi,
    I have some problem creating a simple trigger for auto increment of an "Id_column".
    I create a sequence: create sequence "sequence_name" minvalue 1 maxvalue 999 increment by 1
    then create trigger: create trigger "trigger_registry"
    before insert on "registry"
    for each row
    when (new.ID_registryA is null)
    begin
    select "Sequence_name".nextval into: new.ID_registry
    FROM DUAL;
    END;
    and finally I try to insert something into registry table but I got this error: ORA-04098: il trigger 'SYSTEM.TRIGGER_NAME' is invalid and failed re-validation.
    Has anybody got any idea about this error?

    user3745218 wrote:
    ok, so i've corrected all but the error is still the same: ORA-04098: il trigger 'SYSTEM.TRIGGER_NAME' is invalid and failed re-validation.
    Unless you post SQL*PLus snippet like this, we can't help you:
    SQL> create or replace
      2  trigger emp1_bir
      3  before insert
      4  on emp1
      5  for each row
      6  when (new.sal < 0)
      7  begin
      8  select sss.nextval into :new.empno from dual;
      9  end;
    10  /
    Warning: Trigger created with compilation errors.
    SQL> show error trigger emp1_bir
    Errors for TRIGGER EMP1_BIR:
    LINE/COL ERROR
    2/1      PL/SQL: SQL Statement ignored
    2/8      PL/SQL: ORA-02289: sequence does not exist
    SQL> SY.

  • ORA-06502:numeric or value errORA-04088: error during execution of trigger

    I received the following error message while entering a number within the maximum value (i.e. 9,999,999.) allowed in a data entry form which is separate from the base form:
    ORA-06502: PL/SQL: numeric or value error:number precision too large ORA-06512:at "<Owner>.<Trigger>", line 194 ORA-04088: error during execution of trigger "<Owner>.<Trigger>"
    Where <Owner> is the schema name and <Trigger> is the trigger name. The data block of the entry form is based on a database table, and the sum of all values entered (w/ a maximum value of 99,999,999.) is displayed in the base form. A grand total of this sum along w/ other totals on the base form is also displayed w/ a maximum value defined as 999,999,999. I only receive the above error message when the grand total is greater than 99,999,999. If the grand total is less than or equal to 99,999,999, the base form works fine. Why????
    I have verified all the attributes for the database columns and form fields and all seems to be okay, and I am running out of my wits. I am desperately in need of your help in resolving this issue soon because pressure is on...
    Thanks in advance for any/all the help.

    Orchid wrote:
    I received the following error message while entering a number within the maximum value (i.e. 9,999,999.) allowed in a data entry form which is separate from the base form:
    ORA-06502: PL/SQL: numeric or value error:number precision too large ORA-06512:at "<Owner>.<Trigger>", line 194 ORA-04088: error during execution of trigger "<Owner>.<Trigger>"
    Where <Owner> is the schema name and <Trigger> is the trigger name. The data block of the entry form is based on a database table, and the sum of all values entered (w/ a maximum value of 99,999,999.) is displayed in the base form. A grand total of this sum along w/ other totals on the base form is also displayed w/ a maximum value defined as 999,999,999. I only receive the above error message when the grand total is greater than 99,999,999. If the grand total is less than or equal to 99,999,999, the base form works fine. Why????
    I have verified all the attributes for the database columns and form fields and all seems to be okay, and I am running out of my wits. I am desperately in need of your help in resolving this issue soon because pressure is on...
    Thanks in advance for any/all the help.check your associated database column length. It's precision is not able to hold you said value. increase the length by
    ALTER TABLE table_name 
    MODIFY (column_name NUMBER(20) );it's above solution don't work. Then, probably you use variable in the trigger code which hold the vale and it's size is limited. increase it.
    added
    try this
    increase the length of TAB_S_TOT_COST 9 to 18.
    and your problem will solved.
    Hamid
    Edited by: HamidHelal on Feb 13, 2013 10:28 AM

  • Error while firing WatchedFolder trigger

    Hi all,
    Once every day the server reports the following error and cannot recover (needs restart):
    2008-03-10 22:36:50,855 ERROR [org.quartz.core.ErrorLogger] An error occured while firing trigger 'WatchedFolder.WatchedFolder:605'
    org.quartz.JobPersistenceException: Couldn't select trigger state: Communications link failure due to underlying exception:
    ** BEGIN NESTED EXCEPTION **
    java.net.SocketException
    MESSAGE: Connection reset by peer: socket write error
    STACKTRACE:
    java.net.SocketException: Connection reset by peer: socket write error
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
    at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
    at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2692)
    at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2621)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1552)
    at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1124)
    at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:676)
    at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1030)
    at org.jboss.resource.adapter.jdbc.CachedPreparedStatement.executeQuery(CachedPreparedStatem ent.java:76)
    at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStat ement.java:211)
    at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.selectTriggerState(StdJDBCDelegate.java:2317 )
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.triggerFired(JobStoreSupport.java:2778)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport$37.execute(JobStoreSupport.java:2757)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.ja va:3662)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.triggerFired(JobStoreSupport.java:2751)
    at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:313)
    I have just reinstalled the server and imported the processes I had created earlier, but no custom setup within the "stomach of JBoss/LiveCycle".
    Does anybody knwo what I can do to rectify/localise this error?
    Sincerely
    Kim

    From the LiveCycle ES Error Code Reference
    Extended periods of server inactivity when using JBoss
    Application Server configured with MySQL (the JBoss
    turnkey). The exception is raised by background
    processing during internal database management. Its
    presence is expected: Idle connection with the
    database times out and causes the TCP/IP connection
    to close. Exceptions typically occur after 8 hours or
    more of inactivity in LiveCycle ES.
    [Exceptions seen on JBoss/MySQL and start with:
    java.sql.SQLException: No operations allowed after
    connection closed. Connection was implicitly closed
    due to underlying exception/error: ** BEGIN NESTED
    EXCEPTION
    **com.mysql.jdbc.CommunicationsException
    MESSAGE: Communications link failure due to
    underlying exception: **java.net.SocketException
    MESSAGE: Software]
    The document also says
    This exception does not
    impact the LiveCycle ES
    server processing and
    can be ignored.
    However, I also need to restart the server to get it working again.
    Sincerely,
    Nick

  • Error in execuitng a trigger

    I am getting the following error in executing while executing the "dropping the trigger " , "creating a trigger " . or executing any stored proc .
    Please advise .
    I am on 10g Release 2 on Redhat linux .
    SQL> drop trigger logon_trigger ;
    drop trigger logon_trigger
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01008: not all variables bound
    ORA-06512: at line 21

    I was able to resolve this by setting a undocumented parameter "_system_trig_enabled"=FALSE .
    But , I have a logon trigger . If I set this to FALSE , logon trigger does not kick in .
    How to have a logon trigger working and to avoid this error ?
    QL> drop table t;
    drop table t
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01008: not all variables bound
    ORA-06512: at line 21
    SQL> alter system set "_system_trig_enabled"=FALSE;
    System altered
    SQL> drop table t;
    Table dropped

  • 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.

  • Error in syntax of trigger

    drop trigger hp_backup_check;
    create or replace trigger hp_backup_check
    AFTER INSERT on hp_patient_record
    FOR EACH ROW
    BEGIN
    INSERT INTO hp_backup_record
    values(:old.record_id, :old.patient_name, :old.patient_age, :old.admit_department, sysdate, user from dual);
    END;
    i am getting an error message as
    PL/SQL: SQL Statement ignored
    PL/SQL: ORA-00917: missing comma
    kindly please help

    INSERT INTO hp_backup_record
    select :old.record_id, :old.patient_name, :old.patient_age, :old.admit_department, sysdate, user from dual;
    OR
    INSERT INTO hp_backup_record
    values(:old.record_id, :old.patient_name, :old.patient_age, :old.admit_department, sysdate, user );

  • 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

  • Error in After Report Trigger

    Hi,
    I've developed a report in HRMS for my client which collated the Vacation Accrual data of all employees. When i run the report for all employees which is an optional parameter it throwing the below error.
    REP-0300: ORACLE error occurred.
    REP-0069: Internal error
    In-process job terminated:Terminated with error:
    REP-300:
    During debugging i found that in the After Report Trigger , after the return statement, the below error is being thrown. I couldn't identify the exact source of the error. Any help on this would be much appreciated. Below is the After Report Trigger code.
    function AfterReport return boolean is
    begin
    srw.MESSAGE (12345, 'After Report - Before Return');
    return (TRUE);
    srw.MESSAGE (12345, 'After Report - After Return');
    end;
    Thanks
    Elango

    After spending a lot of time in analyzing, i ripped apart each and every part of the report and found a function where am doing a varchar to date conversion. Then i ran the query individually and picked up the below error.
    ORA-01841: (full) year must be between -4713 and +9999, and not be 0
    Then i identified the record which has incorrect data and modified it thru applications. Oracle Internal error basically arises due to datatype mismatch and its always better to use exception blocks with log messages wherever its applicable.
    Thanks
    Elango.

Maybe you are looking for

  • Macbook Pro Mid-2012 Logic Board replacement, Apple Dragging feet?

    First some background: I have a macbook pro 13" Mid-2012 non retina covered under applecare until Jan. 2016. Starting in late march, i had noticed some performance issues but never took it in as the issue would subside within a day or two. Going into

  • Idoc for Vendor Invoice in FI

    Hi all Could you tell me if there are Idocs available for the following accounting transaction ? : 1) Post Vendor invoice in FI-AP (vendor invoice not referred to purchase order); 2) Park Vendor invoice in FI-AP. Thanks Bye Carlo

  • Dsc, alarm query time out

    Hello, I'm using LabVIEW 2009 SP1 with DSC-Module. Today I had trouble using the "Alarm&Event Qurey.vi" to read data from the citadel database. The Query worked well for days and delivered the data quickly. Well today it didn't, instead it delivered

  • Could you attach a Requisition to a PO after it's created

    Just wondering, if there's a way to attach a requisition to a PO after the PO is created. Basically, in an emergency, buyer creates PO in Core Purchasing & gives the # to the supplier. Later on, she creates the requisition & attaches the document to

  • Adobe Flash CS4 won't open anymore ....

    Hello all, beforehand I thank you for your help. I use Windows Vista and I took all precautions and did scandisk/disk defrag/ and have numerous utilities to keep my computer clean so it can't be that... I have been using Flash CS4 pretty regularly un