Oracle User Defined QUERY

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
ambasta
Participant
Posts: 93
Joined: Thu Jan 19, 2006 10:29 pm
Location: Bangalore

Oracle User Defined QUERY

Post by ambasta »

I am trying to write a user defined query for oracle stage and i have to pass parameterized values for one column named audit_create_date,which i will pass at runtime.but i m getting this error...Oracle call failed; sqlcode = -1008; message: ORA-01008: not all variables bound

in where clause i m passing

where AUDIT_CREATE_DATE BETWEEN TO_DATE(:LAST_RUNTIME,'DD-MON-YYYY HH24:MI:SS') AND TO_DATE(:CURR_TMSTP,'DD-MON-YYYY HH24:MI:SS')

can any one help me asap
ambasta
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Hello Ambasta and welcome to DSXChange.

If you post your problem in the correct forum you will get a better and more accurate set of responses. In this case you posted in "General" but there are differences in what might be happening depending upon whether you are using PX or Server.

Also, as an etiquette note, is you mark your posts "urgent" or "asap" they will tend to be ignored by many knowledgeable posters. This is an all volunteer forum with many of the world's most active and knowledgeable DS experts logging in - but the privilege of getting something "urgent" answered right away is usually paid for; i.e. with a premium service contract with a provider.

In your case the issue is that your stage is being passed columns but your user SQL is not using them as placeholders. Try having DS generate some SQL and look at the syntax and contents and you'll see what the differences are to your user-written SQL and should be able to sort out the problem.
ambasta
Participant
Posts: 93
Joined: Thu Jan 19, 2006 10:29 pm
Location: Bangalore

Post by ambasta »

Hello ArndW,
thanx for your kind suggession.i will really try to be more careful next time.
If, i will generate this query thru datastage,i think,i will not take care of my requirement as passing date at runtime,or read data from any other file .can u plz suggest me what hould i do???
ambasta
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I suggested you have DS create a SQL query so that you can look at how it handles placeholders and not to really execute your logic.
Post Reply