472,353 Members | 1,400 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

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 8358
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

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

Similar topics

6
by: Tomislav Petrovic | last post by:
I have following code on my page.... $ora_tns = "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=pirana)(PORT=1521))...
0
by: Alan Cobban | last post by:
Hello, I'm in the process of tuning our auditing procedures. At present we have one table, mp_event_audits which holds username, date/time,...
2
by: smanicom | last post by:
Hi all I need help urgently as I am in the middle of a migration and can't resolve a TNS error. My db has been fine for months! Today I...
4
by: mallz | last post by:
hi, im incrementing my id by using sequence in oracle.........but i dont know what to specify in my insert statement in my jsp page.......... ...
2
by: Nestor Fra | last post by:
Hi guys I'm tried to open a conection with oracle databse, but I received thoses error(see below). My knwologed about db it's very poor (like my...
6
by: bhushanbagul | last post by:
Hi All, I m facing mentioned error while executing below code at line no 3. CREATE or REPLACE DIRECTORY MY_DIR AS '/outputs/EXTRACTS'; GRANT...
3
by: Alv | last post by:
I need a solution how to connect 2 oracle databases using DBLink. Oracle is installed for Linux. It is working properly when I connect from the...
6
by: julietmachiwa | last post by:
I have an existing database 8i . I just installed Developer 2000 for Windows NT I am failing to connect to the database. How should I configure...
1
by: shashikanth69 | last post by:
Hello, when i try to execute the code it says, ORA-00972: identifier is too long at adapter1.Fill(Ora_Dataset) Sub BindGrid() sSql=”Select *...
3
by: nur08 | last post by:
/* Note: default for serveroutput is OFF. Therefore no 'Insert attempted' as I did not switch it on by set serveroutput on; */ SQL> CREATE OR...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.