Hi All
I am facing a problem while parameterising the query. I have a requirement to paramaeterise the source query.
For Ex: - SELECT * FROM #$SCHEMA#.EMP
I am calling the total query in a job parameter. When I declared the parameter as a string the total query is considered as string which includes Schema value also.
I tried in the parameter sourcequery(my param name) as
SELECT * FROM '":$SCHEMA:"'.EMP
but it is not working...
can some one throw light on this.
Thanks
skumar
parameterisation problem
Moderators: chulett, rschirm, roy
Re: parameterisation problem
If your query, apart from the schema name, can change from run to run, you will need to build the final query before the job is started. DataStage will not replace parameters embedded within parameters.
A Basic routine called by a job sequencer should be able to handle that for you using the EReplace function. The routine should return the final query, which you would store in a user variable and pass as the query parameter to your job.
Regards,
A Basic routine called by a job sequencer should be able to handle that for you using the EReplace function. The routine should return the final query, which you would store in a user variable and pass as the query parameter to your job.
Regards,
- james wiles
All generalizations are false, including this one - Mark Twain.
All generalizations are false, including this one - Mark Twain.