ORA:00904 Error

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
scottr
Participant
Posts: 51
Joined: Thu Dec 02, 2004 11:20 am

ORA:00904 Error

Post by scottr »

I am trying to insert data in to tabel which already has some data from .csv file.
in the oci stage after defining the columns ,if i click view data error is comming for the last column ORA-00904: "PID_TYPE": invalid identifier.

for test if change the columns order then also the error comming for the last column ORA-00904: "DATA_LABEL": invalid identifier

u guys have any idea what's wrong.

thanks for help.
ketfos
Participant
Posts: 562
Joined: Mon May 03, 2004 8:58 pm
Location: san francisco
Contact:

Post by ketfos »

Hi,

Try changing column names in Designer and view the input data.


Ketfos
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

You have to import the table definitions using DS Manager, then load those definitions into the OCI stage. In your transformer, map the incoming values from the file to the equivalent columns in the outbound link going to the OCI stage.

You MUST use the target tables definitions as loaded by DS. Never attempt to 'freehand' metadata, nor assume that metadata doesn't matter. IT DOES. DataStage relies on you using the appropriate metadata, that way it can adjust the data for the source/target.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
talk2shaanc
Charter Member
Charter Member
Posts: 199
Joined: Tue Jan 18, 2005 2:50 am
Location: India

Post by talk2shaanc »

Its Oracle error,
ORA-00904: string: invalid identifier
Cause: You tried to execute an SQL statement that included an invalid column name or the column name is missing.
Solution: Import proper metadata into your Oracle stage, directly from the DataBase, Instead of free hand typing. As every body has suggested.
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Oracle points out invalid column names starting from the very last column in the list. Hence the change in error.

Maybe you can start with checking the table name as an incorrectly spelt table name may cause problem with all its columns.

Try to run the SQL in SQLplus or TOAD.
talk2shaanc
Charter Member
Charter Member
Posts: 199
Joined: Tue Jan 18, 2005 2:50 am
Location: India

Post by talk2shaanc »

Hey,
Just trying to be more specific.If table name given in SQL query is incorrect and the table does not exist, the error will be ORA-00903: invalid table name.
If the incorrect Table name exist in the Data-Base then only you will get ORA-00904: invalid column name.
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Yep talk2shaanc. You are correct. My words were to be read as the 'alias' used in the tablename not matching that of those prefixed in the column names.

I do not have Oracle here. So it is not possible to try the combination.

The first point of focus must be to make the SQL work (with hardcoded insert values) in any other client such as SQLPlus or TOAD.
Post Reply