RE: Invalid column in table - how to access it?
Use: Select name from messages; See this example: SQL create table t1 (col1 number); Table created. SQL desc t1; Name Null?Type - col1 NUMBER SQL insert into t1 (col1) values (1); insert into t1 (col1) values (1) * ERROR at line 1: ORA-00904: invalid column name SQL insert into t1 (col1) values (1); 1 row created. SQL select col1 from t1; select col1 from t1 * ERROR at line 1: ORA-00904: invalid column name SQL select col1 from t1; col1 -- 1 Guang -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of [EMAIL PROTECTED] Sent: Friday, February 28, 2003 1:40 PM To: Multiple recipients of list ORACLE-L Subject: Invalid column in table - how to access it? I have a table - messages. I couldn't access one column in this table when I do Select name from messages; I get an error message - ORA-00904: invalid column name All the other columns I could select from this table. When I checked the table structure through OEM, I found this column has double quotes around it i.e., NAME. All other columns do not have double quotes around their name. Question: How do I select this column from select statement? How do I correct this problem? Thanks for the help in advance. Rao -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: [EMAIL PROTECTED] INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: gmei INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
RE: Invalid column in table - how to access it?
Rao, Change your select to select NAME from messages; to fix this, you will either need to drop and recreate the table (without the quotes), or add the column NAME ( alter table messages add(name varchar2(n)) update messages set name = NAME; alter table messages drop column NAME good luck! Tom Mercadante Oracle Certified Professional -Original Message- Sent: Friday, February 28, 2003 1:40 PM To: Multiple recipients of list ORACLE-L I have a table - messages. I couldn't access one column in this table when I do Select name from messages; I get an error message - ORA-00904: invalid column name All the other columns I could select from this table. When I checked the table structure through OEM, I found this column has double quotes around it i.e., NAME. All other columns do not have double quotes around their name. Question: How do I select this column from select statement? How do I correct this problem? Thanks for the help in advance. Rao -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: [EMAIL PROTECTED] INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Mercadante, Thomas F INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
RE: Invalid column in table - how to access it?
Title: RE: Invalid column in table - how to access it? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] I have a table - messages. I couldn't access one column in this table when I do Select name from messages; I get an error message - ORA-00904: invalid column name All the other columns I could select from this table. When I checked the table structure through OEM, I found this column has double quotes around it i.e., NAME. All other columns do not have double quotes around their name. Question: How do I select this column from select statement? How do I correct this problem? That's funny. name is not an Oracle Reserved Word (see Appendix C of the SQL reference manual) as far as I know. I was able to create a table called NAME with a column called NAME and do a select without the double quotes. What would the output of select column_name, dump (column_name) from user_tab_columns where table_name = 'THE_TABLE_NAME' ; show?
RE: Invalid column in table - how to access it?
Rao - And you'll save yourself a lot of trouble if you just drop this table. If it has valuable data in it, you can use Guang's methods to move the data into a new table. The quicker you do this, the less pain in the long run. Dennis Williams DBA, 40%OCP, 100% DBA Lifetouch, Inc. [EMAIL PROTECTED] -Original Message- Sent: Friday, February 28, 2003 1:05 PM To: Multiple recipients of list ORACLE-L Use: Select name from messages; See this example: SQL create table t1 (col1 number); Table created. SQL desc t1; Name Null?Type - col1 NUMBER SQL insert into t1 (col1) values (1); insert into t1 (col1) values (1) * ERROR at line 1: ORA-00904: invalid column name SQL insert into t1 (col1) values (1); 1 row created. SQL select col1 from t1; select col1 from t1 * ERROR at line 1: ORA-00904: invalid column name SQL select col1 from t1; col1 -- 1 Guang -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of [EMAIL PROTECTED] Sent: Friday, February 28, 2003 1:40 PM To: Multiple recipients of list ORACLE-L Subject: Invalid column in table - how to access it? I have a table - messages. I couldn't access one column in this table when I do Select name from messages; I get an error message - ORA-00904: invalid column name All the other columns I could select from this table. When I checked the table structure through OEM, I found this column has double quotes around it i.e., NAME. All other columns do not have double quotes around their name. Question: How do I select this column from select statement? How do I correct this problem? Thanks for the help in advance. Rao -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: [EMAIL PROTECTED] INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: gmei INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: DENNIS WILLIAMS INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
RE: Invalid column in table - how to access it?
Hi All, Thanks for the replies. I tried to select the column with --- select NAME from messages; I am getting the ORA-904 error. I would try to recreate the table, import the data and let you know. Rao -Original Message- Sent: Friday, February 28, 2003 2:05 PM To: Multiple recipients of list ORACLE-L Rao, Change your select to select NAME from messages; to fix this, you will either need to drop and recreate the table (without the quotes), or add the column NAME ( alter table messages add(name varchar2(n)) update messages set name = NAME; alter table messages drop column NAME good luck! Tom Mercadante Oracle Certified Professional -Original Message- Sent: Friday, February 28, 2003 1:40 PM To: Multiple recipients of list ORACLE-L I have a table - messages. I couldn't access one column in this table when I do Select name from messages; I get an error message - ORA-00904: invalid column name All the other columns I could select from this table. When I checked the table structure through OEM, I found this column has double quotes around it i.e., NAME. All other columns do not have double quotes around their name. Question: How do I select this column from select statement? How do I correct this problem? Thanks for the help in advance. Rao -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: [EMAIL PROTECTED] INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Mercadante, Thomas F INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: [EMAIL PROTECTED] INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
Re: Invalid column in table - how to access it?
Put NAME into lower case and enclose it in double quotes. - Original Message - To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED] Sent: Friday, February 28, 2003 2:39 PM Hi All, Thanks for the replies. I tried to select the column with --- select NAME from messages; I am getting the ORA-904 error. I would try to recreate the table, import the data and let you know. Rao -Original Message- Sent: Friday, February 28, 2003 2:05 PM To: Multiple recipients of list ORACLE-L Rao, Change your select to select NAME from messages; to fix this, you will either need to drop and recreate the table (without the quotes), or add the column NAME ( alter table messages add(name varchar2(n)) update messages set name = NAME; alter table messages drop column NAME good luck! Tom Mercadante Oracle Certified Professional -Original Message- Sent: Friday, February 28, 2003 1:40 PM To: Multiple recipients of list ORACLE-L I have a table - messages. I couldn't access one column in this table when I do Select name from messages; I get an error message - ORA-00904: invalid column name All the other columns I could select from this table. When I checked the table structure through OEM, I found this column has double quotes around it i.e., NAME. All other columns do not have double quotes around their name. Question: How do I select this column from select statement? How do I correct this problem? Thanks for the help in advance. Rao -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: [EMAIL PROTECTED] INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Mercadante, Thomas F INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: [EMAIL PROTECTED] INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Chuck Hamilton INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
RE: Invalid column in table - how to access it? - SOLVED - Thanks
I recreated the table and loaded the data into it again. Thanks to Guang, Tom Mercadante, Dennis for the suggestions. Rao - Original Message - To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED] Sent: Friday, February 28, 2003 2:39 PM Hi All, Thanks for the replies. I tried to select the column with --- select NAME from messages; I am getting the ORA-904 error. I would try to recreate the table, import the data and let you know. Rao -Original Message- Sent: Friday, February 28, 2003 2:05 PM To: Multiple recipients of list ORACLE-L Rao, Change your select to select NAME from messages; to fix this, you will either need to drop and recreate the table (without the quotes), or add the column NAME ( alter table messages add(name varchar2(n)) update messages set name = NAME; alter table messages drop column NAME good luck! Tom Mercadante Oracle Certified Professional -Original Message- Sent: Friday, February 28, 2003 1:40 PM To: Multiple recipients of list ORACLE-L I have a table - messages. I couldn't access one column in this table when I do Select name from messages; I get an error message - ORA-00904: invalid column name All the other columns I could select from this table. When I checked the table structure through OEM, I found this column has double quotes around it i.e., NAME. All other columns do not have double quotes around their name. Question: How do I select this column from select statement? How do I correct this problem? Thanks for the help in advance. Rao -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: [EMAIL PROTECTED] INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Mercadante, Thomas F INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: [EMAIL PROTECTED] INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Chuck Hamilton INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: [EMAIL PROTECTED] INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services - To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).