Page 1 of 1

Pass an entire SQLQuery as a parameter, in userdefined sql?

Posted: Fri Jul 31, 2009 12:19 am
by ds_infy
I have a job that extracts records from an oracle db. The same job is used to extract where only the SQL query changes. Can i use the same job for both extracts by passing the Query as a parameter?If so is there any particular syntax that needs to be adhered to?

Posted: Fri Jul 31, 2009 1:43 am
by BugFree
Yes. We can parameterize the query. No seperate syntax.
It worked for me for simple queries.
I am not sure about the complex/Huge queries.

One more thing is, if you are running this job at a time for different queries, make sure that you build this job with Multi Instance enabled.

Posted: Fri Jul 31, 2009 1:43 am
by ArndW
Yes, the user-defined query can be a parameter. You just have to ensure that the column names and number of columns returned matches.

Posted: Fri Jul 31, 2009 2:19 am
by Sainath.Srinivasan
Lookout for any quote or special characters which may interrupt the string.