Page 1 of 1

User Variable activity

Posted: Thu Jan 05, 2012 2:46 am
by pattemk
Hi , i am trying to pass the whole sql as a parameter to a particular job.

exec_commd-->user_variable-->parallel job

Query is like below
SELECT CUSTID CUSTOMER, EMPID, CITY FROM TABLE A WHERE A.CUSTID = 123

I have used the following argument in the usser variable activity stage

Field(Trim(StartLoop.$Counter,'"'),@FM,1)

i was able to pass only SELECT CUSTID CUSTOMER to the job , could you please advice how should i write the argument in order for the job to get the whole sql.

Thanks
kumar

Posted: Thu Jan 05, 2012 3:17 am
by pandeesh
What you are doing in the exec command activity?

Posted: Thu Jan 05, 2012 3:38 am
by suse_dk
You must have more in the job than:
exec_commd-->user_variable-->parallel job
...since you use the output "StartLoop.$Counter".

I think the loop separator is set comma as default som if you pass your query statement though the loop it will cut the query where it encounters the first comma and only pass "SELECT CUSTID CUSTOMER" to the job

Posted: Thu Jan 05, 2012 5:56 am
by pattemk
Yes, i do have start loop and end loop in my job,

how should write the argument in the uva stage to provide the whole sql statements.

Please advice

Posted: Thu Jan 05, 2012 7:43 am
by chulett
As noted, make sure your 'list of things' you are iterating thru have a proper delimiter between them, one that doesn't occur in the data.