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
rsunny
Participant
Posts: 223
Joined: Sat Jul 03, 2010 10:22 pm

ORA-00904 error

Post by rsunny »

Hi everyone,

I am trying to implement scd2 with the surrogatekey .i am getting an error while executing
CopyOfjs_scd1_SK..xfm1: |CopyOfjs_scd1_SK..ODBC_47.update: DSD.BCIOpenW call to SQLPrepare failed.
SELECT "sid","storeid","name","city","state","cid","startdate","enddate" FROM CDLEXIS1
SQLSTATE=S0022, DBMS.CODE=904
[DataStage][SQL Client][ODBC][DataDirect][ODBC Oracle Wire Protocol driver][Oracle]ORA-00904: "enddate": invalid identifier|

can anybody tell me what is this error for?

thanks in advance
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

It simply means that there is no column named "enddate" in your table.
-craig

"You can never have too many knives" -- Logan Nine Fingers
rsunny
Participant
Posts: 223
Joined: Sat Jul 03, 2010 10:22 pm

Post by rsunny »

chulett wrote:It simply means that there is no column named "enddate" in your table.
I see enddate in my table which is a reference table but i dont see enddate in my source table.so please can you tell me do i need to have enddate in my source table too.

thanks in advance
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Yes, if you're going to try to select it by name from source.

No if you're going to select it as a constant from source or generate its value within the job. But this second approach can not be done in the Oracle stage - it would need to be done on the output of a Transformer stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
rsunny
Participant
Posts: 223
Joined: Sat Jul 03, 2010 10:22 pm

Post by rsunny »

thanks everyone for the reply, but please can any one tell me how to find a solution for this as my source dont have start and end date and my reference has both startdate and enddate.now i am trying to implement scd type2 and i tried to implement the logic but not working as i am finding the same error.does my approach wrong?can anyone please suggest me how to find a solution for this error.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You can't select a column that doesn't exist, so you'll need to fix that in your source. For the reference, it sounds like you need to do a "range lookup" where your source date is between those two reference dates.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply