Getting error while creating trigger- PL/SQL: ORA-01747: invalid user.table.column, table.column, or column specification

cool_taps

I am creating a trigger in which I want to update fields from another table. Please see below trigger which I have written:

create or replace
 TRIGGER RE_SE_INSERT
 AFTER INSERT OR UPDATE ON USER FOR EACH ROW

 BEGIN
 update user set 
 :new.ci_No = (select ci_No from customer where ci_id = :new.ci_id),
 :new.ci_name = (select ci_name from customer where ci_id = :new.ci_id),
 :new.IS_deleted = (select deleted from customer where ci_id = :new.ci_id);

 END;

I have checked for the column name whether they are wrong but all the column name are correct as per the table but still I get ORA-01747 error of invalid table.column.

Could you please help me here?

Thanks in advance! Tapan

Gaurav Soni
 create or replace trigger RE_SE_INSERT
 BEFORE INSERT OR UPDATE  --create a BEFORE insert/update trigger
 ON USER FOR EACH ROW
 DECLARE
  CURSOR new_cur
  IS 
    SELECT ci_no
          ,ci_name
          ,deleted
     FROM customer
     where ci_id = :new.ci_id;
   new_row  new_cur%ROWTYPE;
 BEGIN
  --update user set   --remove this statement
  OPEN new_cur;
  FETCH new_cur INTO new_row;
   IF new_cur%FOUND THEN
    :new.ci_No      := new_row.ci_no;
    :new.ci_name    := new_row.ci_name;
    :new.IS_deleted := new_row.deleted;
   END IF;
  CLOSE new_cur;

END RE_SE_INSERT;
/

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

PHP - ORA-01747: invalid user.table.column, table.column, or column specification

From Dev

org.hibernate.exception.SQLGrammarException: ORA-01747: invalid user.table.column, table.column, or column specification

From Dev

Creating a Trigger to update another table's column

From Dev

Error while getting list of column names from a Firebird database table

From Dev

Error while getting list of column names from a Firebird database table

From Dev

Getting invalid column name using a pivot table

From Dev

Getting invalid column name using a pivot table

From Dev

Vacuum table while creating serial column

From Dev

ORA-01735: invalid ALTER TABLE option (While trying to drop DEFAULT on a COLUMN)

From Dev

ORA-01735: invalid ALTER TABLE option (While trying to change DEFAULT on a COLUMN)

From Dev

getting error ORA-00907 while creating a table in sql developer

From Dev

Uncaught error: Invalid type for google table column

From Dev

hive creating table duplicate column name error

From Dev

ERROR: cannot ALTER TABLE because it has pending trigger events while attempting to drop a column in a table

From Dev

Not getting column of table

From Dev

while creating a table select one column from another table sql

From Dev

Getting Error : Invalid Column NoteId

From Dev

plsql get column names by table value

From Dev

Adding temporary column to table inside PLSQL

From Dev

Creating a single column table with Slick

From Dev

Adding a default value to a column while creating table in hive

From Dev

How does hibernate arranges column while creating a table?

From Dev

Getting error while executing criteria query on enum column in mysql table hibernate

From Dev

Getting error while executing the query for sql server table column name with japanese characters

From Dev

PLSQL: BEFORE INSERT TRIGGER (check value in column from other table before allowing insert)

From Dev

no column was specified for column [x] of [table] and invalid column name

From Dev

Bind variable Error while creating trigger on table

From Dev

creating trigger error Error: ORA-04076: invalid NEW or OLD specification

From Dev

after insert trigger showing error in mysql while creating trigger- Unknown column 'IMEI' in 'field list'

Related Related

  1. 1

    PHP - ORA-01747: invalid user.table.column, table.column, or column specification

  2. 2

    org.hibernate.exception.SQLGrammarException: ORA-01747: invalid user.table.column, table.column, or column specification

  3. 3

    Creating a Trigger to update another table's column

  4. 4

    Error while getting list of column names from a Firebird database table

  5. 5

    Error while getting list of column names from a Firebird database table

  6. 6

    Getting invalid column name using a pivot table

  7. 7

    Getting invalid column name using a pivot table

  8. 8

    Vacuum table while creating serial column

  9. 9

    ORA-01735: invalid ALTER TABLE option (While trying to drop DEFAULT on a COLUMN)

  10. 10

    ORA-01735: invalid ALTER TABLE option (While trying to change DEFAULT on a COLUMN)

  11. 11

    getting error ORA-00907 while creating a table in sql developer

  12. 12

    Uncaught error: Invalid type for google table column

  13. 13

    hive creating table duplicate column name error

  14. 14

    ERROR: cannot ALTER TABLE because it has pending trigger events while attempting to drop a column in a table

  15. 15

    Not getting column of table

  16. 16

    while creating a table select one column from another table sql

  17. 17

    Getting Error : Invalid Column NoteId

  18. 18

    plsql get column names by table value

  19. 19

    Adding temporary column to table inside PLSQL

  20. 20

    Creating a single column table with Slick

  21. 21

    Adding a default value to a column while creating table in hive

  22. 22

    How does hibernate arranges column while creating a table?

  23. 23

    Getting error while executing criteria query on enum column in mysql table hibernate

  24. 24

    Getting error while executing the query for sql server table column name with japanese characters

  25. 25

    PLSQL: BEFORE INSERT TRIGGER (check value in column from other table before allowing insert)

  26. 26

    no column was specified for column [x] of [table] and invalid column name

  27. 27

    Bind variable Error while creating trigger on table

  28. 28

    creating trigger error Error: ORA-04076: invalid NEW or OLD specification

  29. 29

    after insert trigger showing error in mysql while creating trigger- Unknown column 'IMEI' in 'field list'

HotTag

Archive