User variable Activity and loop activity question
Posted: Wed Feb 08, 2012 5:20 pm
Hi,
I need to loop the datastage job by passing the values from a text file which is delimited by comma to the where clause in a user defined SQL having two parameters.
Sample file :
JOHN,US
APPLE,UK
ADAM,INDIA
Sample Query:
select A,B from table
where NAME='#jpparm1'
and COUNTY_CD='#jpparm2'
In first run the job should pull the data where NAME='JOHN' and COUNTY_CD='US' and in second run it should pull where NAME='APPLE' and COUNTY_CD='UK'
Previously i've implemented with only one parameter by using execute command stage to read the data from a file and using convert function and then using the loop activity stage.
Could anyone please throw your inputs in achieving this requirement.
I need to loop the datastage job by passing the values from a text file which is delimited by comma to the where clause in a user defined SQL having two parameters.
Sample file :
JOHN,US
APPLE,UK
ADAM,INDIA
Sample Query:
select A,B from table
where NAME='#jpparm1'
and COUNTY_CD='#jpparm2'
In first run the job should pull the data where NAME='JOHN' and COUNTY_CD='US' and in second run it should pull where NAME='APPLE' and COUNTY_CD='UK'
Previously i've implemented with only one parameter by using execute command stage to read the data from a file and using convert function and then using the loop activity stage.
Could anyone please throw your inputs in achieving this requirement.