Page 1 of 1

Passing parameters to the query read from a file

Posted: Thu Oct 02, 2014 10:49 am
by harikhk
Hi,

Below is my requirement.

Execute a query by reading the query from a file in DB2 connector stage and writing to a sequential file.
But the catch is I have a where clause in the select query and pass parameters at run time to this where clause.
For example : where search_column like #PARAM#

Could anyone help me how can I implement this passing parameters to the query read from a file
I am not sure if we can do this in data stage.

Any suggestions or alternate approaches on this could be a great help.

Posted: Thu Oct 02, 2014 1:44 pm
by chulett
You can't, at that point the parameters are just text. You need to build the file on the fly with the parameter values substituted in, ready to go.

Posted: Thu Oct 02, 2014 4:19 pm
by harikhk
Thanks Craig