Page 1 of 1

Oracle User Defined QUERY

Posted: Fri Sep 22, 2006 6:20 am
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

Posted: Fri Sep 22, 2006 6:30 am
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.

Posted: Fri Sep 22, 2006 7:22 am
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???

Posted: Fri Sep 22, 2006 7:29 am
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.