Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

not a wrong column name 2

Status
Not open for further replies.

sjakiePP

Programmer
Apr 6, 2004
104
NL
Hello,

With PL/SQL Developer I recieve the error ora-00904. It tells me that my column names are not correct. Then I checked it, the names are correct.

What could it be?

Thanks in advance.
Sjakie



---------------------------------------------
Yes, the world is full of strange people.
 
Can you provide more information please. Are you running PL/SQL within a SQLPlus session, or forms, or another application? Are you accessing the table(s) through roles? Are the grants set up and synonyms correct?

Also provide other info that may help us.
 
I'm not running PL/SQL within a SQLPlus session. Just as a stand alone application. I do not use forms or any other application.

Do you mean user roles? The user used, has root rights. The grants and synonyms are set up correctly.

The error started after some tables had been imported through the odbc connection (from an Access database).

Would it help just to restart the database?

Sjakie

---------------------------------------------
Yes, the world is full of strange people.
 
SJakie,

Please post actual copies and pastes of the following:

1) the PL/SQL code you are attempting to execute
2) the actual resulting error message
3) the results of this query: "SELECT USER FROM DUAL;"
4) and a "DESCRIBE <tablename>" of the tables involved in your PL/SQL code.

Thanks,

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
@ 16:23 (07Jan05) UTC (aka "GMT" and "Zulu"),
@ 09:23 (07Jan05) Mountain Time

Click here to Donate to Tsunami Relief. 100% of your contributions here go to the victims...0% to administration.
They were "The First-Responder" to the disaster, with relief deliveries arriving before Red Cross and U.S. aid.
 
I'm about to be sure that the issue is due to using double quotes and mixed case in table names. Thus table (column) names just look like to be similar, but in fact they may differ.

Regards, Dima
 
The query is as follows:

ALTER TABLE rb_TypeStrInsp ADD CONSTRAINT Ref_Sim_Tsi foreign key (sim_ID) REFERENCES rb_SrtInspMethode (sim_ID);

The error message: "ORA-00904: Invalid column name"

The result of the query "SELECT USER FROM DUAL;" is the username I login to the database.

I wish not to show the tables, but the used column names are of the same type, NUMBER(38), not nullable.

The query has been checked on misspelled columnnames and table names three times. By me, probably above 10 times.

I use the same database in MS Access, there it works.

---------------------------------------------
Yes, the world is full of strange people.
 
sjakiePP,

I can understand your hesitance to post the "Describes" of your tables, but without the "Describes", we cannot confirm definitively whether or not you are a victim of the problem that Sem/Dima very correctly mentions, above.

In the absence of your willingness to post that information, you can check for us by doing "Describes" of your table(s). If any of the column names appear in mixed case instead of UPPERCASE, then you suffer from the problem Dima mentions. Your options for resolution are either A) recreate your tables without using doubloe quotes ("...") to define any of your table elements, or B) always and forever use double quotes to surround the mixed case names of your table elements. Further, the case mixing that you surround with the double quotes must always match the case mixing that appears in your "Describes".

Let us know your findings and your decisions.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
@ 18:04 (10Jan05) UTC (aka "GMT" and "Zulu"),
@ 11:04 (10Jan05) Mountain Time

Click here to Donate to Tsunami Relief. 100% of your contributions here go to the victims...0% to administration.
They were "The First-Responder" to the disaster, with relief deliveries arriving before Red Cross and U.S. aid.
 
The column names appear in mixed case.

I changed the query to following:

ALTER TABLE "RB_TYPESTRINSP"
ADD CONSTRAINT REF_SIM_TSI foreign key ("sim_ID")
REFERENCES "RB_SRTINSPMETHODE" ("sim_ID");

This worked.

My thanks goes out to both of you!

Sjakie

---------------------------------------------
Yes, the world is full of strange people.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top