469,297 Members | 2,134 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,297 developers. It's quick & easy.

ORA-00904: "ACTION": invalid identifier

Hey guys I am trying to create an trigger, but getting this error. My code is as follows
Expand|Select|Wrap|Line Numbers
  1. CREATE OR REPLACE TRIGGER vendorpricingTR
  2. BEFORE UPDATE OF pricing ON vendors
  3. FOR EACH ROW
  4. DECLARE 
  5. ActionVar char(6);
  6. BEGIN
  7.  
  8. IF UPDATING THEN
  9. ActionVar :=’UPDATE’;
  10. END IF;
  11. INSERT into VENDORS
  12. (vendorsname,addr,pricing,ratings, Action)
  13. VALUES (:old.vendorsname, :old.addr, :new.pricing,  :old.ratings, Actionvar);
  14.  
  15. END;
  16.  
error is

LINE/COL ERROR
-------- -----------------------------------------------------------------
8/1 PL/SQL: SQL Statement ignored
9/36 PL/SQL: ORA-00904: "ACTION": invalid identifier
Dec 12 '09 #1
6 8025
debasisdas
8,127 Expert 4TB
Is action a field in your table ?
Dec 12 '09 #2
Action is a new column I want to insert in the table...............
Dec 12 '09 #3
amitpatel66
2,367 Expert 2GB
Can you please post the output of the below command here for reference:

Expand|Select|Wrap|Line Numbers
  1.  
  2. SQL> desc VENDORS
  3.  
  4.  
Dec 14 '09 #4
debasisdas
8,127 Expert 4TB
the column must exist in the table to insert the value into it.
Dec 14 '09 #5
Saii
145 Expert 100+
Re-check your trigger code for following
1. There are no :old values when inserting to a table.
2. This is row level trigger, you need to store the values of the row to use it later.
Dec 17 '09 #6
Hi,

This oracle error Action is : Enter a valid column name. A valid column name must begin with a letter, be less than or equal to 30 characters, and consist of only alphanumeric characters and the special characters $, _, and #. If it contains other characters, then it must be enclosed in double quotation marks. It may not be a reserved word.

Source : http://www.dbcodeerror.com/oracle-da...id-identifier/
Dec 21 '09 #7

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

6 posts views Thread by Tomislav Petrovic | last post: by
reply views Thread by Alan Cobban | last post: by
4 posts views Thread by mallz | last post: by
3 posts views Thread by nur08 | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.