Home » Infrastructure » Unix » ORA-00904: invalid column name
ORA-00904: invalid column name [message #97563] Thu, 01 August 2002 06:32 Go to next message
pash
Messages: 1
Registered: August 2002
Junior Member
i am trying to update a name like s'mith in my emp_name
table
the command i am giving is
update emp_name set name='s'mith' where emp_no=250;
i can't updat the name because of the '.
it give s error ORA-00904: invalid column name.can anybody help me and tell how to put the ' in
between the names.
the properties of the name column is varchar2.
It will be kind of u,if u help me
regards
pash
Re: ORA-00904: invalid column name [message #97564 is a reply to message #97563] Thu, 01 August 2002 09:23 Go to previous messageGo to next message
Manuel Barrientos
Messages: 1
Registered: August 2002
Junior Member
Try putting 's''mith'.
Re: ORA-00904: invalid column name [message #97750 is a reply to message #97563] Thu, 19 December 2002 04:51 Go to previous messageGo to next message
Neeraj Patankar
Messages: 1
Registered: December 2002
Junior Member
try using this command.
also check for the field name in the table.

update emp_name set name='s''mith' where emp_no=250
Re: ORA-00904: invalid column name [message #98228 is a reply to message #97750] Tue, 18 May 2004 01:11 Go to previous messageGo to next message
Barry
Messages: 5
Registered: August 2001
Junior Member
declare
str:='''';
now concate this str wherever you want to put '

Regards,
Re: ORA-00904: invalid column name [message #98306 is a reply to message #97750] Thu, 08 July 2004 06:27 Go to previous messageGo to next message
Ravindra Rao H
Messages: 1
Registered: July 2004
Junior Member
try the following update statement it should work fine.
update emp set ename = '''s''mith' where empno=7369;
Re: ORA-00904: invalid column name [message #98330 is a reply to message #97750] Fri, 23 July 2004 04:22 Go to previous messageGo to next message
Rob
Messages: 70
Registered: January 2000
Member
In my opinion most transparent way of dealing with this kind of problem is by using characters from the ascii set.
The simplest way to obtain their values is using this routine:

begin
for i in 1..200
loop
dbms_output.put_line( i||' .. '||chr(i) );
end loop;
end;

From the result you can derive that the charater you need is character# 39. Your update statement using this technique will look like this:

update emp_name set name='s'||chr(39)||'mith' where emp_no=250
Re: ORA-00904: invalid column name [message #98434 is a reply to message #97563] Mon, 04 October 2004 04:17 Go to previous messageGo to next message
Jignesh
Messages: 6
Registered: April 2002
Junior Member
update emp_name set name="'"+'s'+"'"+'mith'+"'" where emp_no=250;
Re: ORA-00904: invalid column name [message #98508 is a reply to message #97563] Wed, 08 December 2004 08:52 Go to previous messageGo to next message
Srikanth K Kota
Messages: 1
Registered: December 2004
Location: Panama City
Junior Member
This is a common logical problem to the programmers. The best way to rectify this problem I feel is converting the ' (single quote) into a some other special charecter like #* or *# and inserting that into the database, in which database will have no problem. when you retrive the data then convert back the system into the ' (single quote) and display. Similarly one will also get problem with " (double quotes).

For this to implement is make a common fuction and just before inserting the data run the funtion and similarly after retriving the data run the another common function which will convert back the special charecters into your readable form.

If you can tell which programming language you are using, I will try to help you with the ready-made functions in that langugue.
Re: ORA-00904: invalid column name [message #98581 is a reply to message #97563] Mon, 17 January 2005 00:21 Go to previous messageGo to next message
vijayalakshmi
Messages: 4
Registered: February 2004
Junior Member
Hi
When i try to export data with table structure
ORA-00904: invalid identifier
how can rectify it
A solution to ORA-00904 [message #98603 is a reply to message #97563] Thu, 27 January 2005 00:54 Go to previous message
Chris
Messages: 128
Registered: November 1998
Senior Member
I am not an expert with oracle, I get by running on oracle, mysql, mckoi, even mssql depending no the clients.

But, I do wonder, I really do, would it have been so difficult to place the NAME of the invalid column IN the error message.

I really do wonder who wrote this, and why they didn't do this, maybe it is a security setting, but when you are migrating versions of databases, and trying to run on test machines, and you get this, YOU REALLY would like a pointer to where the update code frazzled, instead of (in my case) a stack which contains only jakarta servlet classes...

Really, is it so difficult. I hate ORA-00904.
Previous Topic: output of uniq -c command as pipe delimited
Next Topic: SCO Open Server Installation(UNIX)
Goto Forum:
  


Current Time: Wed Apr 24 15:31:40 CDT 2024