I have created a job parameter name "dnm".
I need to use the parameter in a count query ...in the ODBC stage (Sql server 05).
select count(deptno) from emp where dname = acct.
I want to parameterizet the deptno like..
select count(deptno) from emp where dname = '#dnm#'; (even tried "#dnm#")
It won't work..is it different in DS Server 8?
pl. help. thanks.
Job parameter in where clause of ODBC stage query (DS Server
Moderators: chulett, rschirm, roy
Job parameter in where clause of ODBC stage query (DS Server
Those who throw objects at crocodiles should be asked to retreive 'em.
-
- Participant
- Posts: 407
- Joined: Mon Jun 27, 2005 8:54 am
- Location: Walker, Michigan
- Contact:
Re: Job parameter in where clause of ODBC stage query (DS Se
Have you tried the Dynamic RDBMS stage to see if it will work in that stage?ds_is_fun wrote:I have created a job parameter name "dnm".
I need to use the parameter in a count query ...in the ODBC stage (Sql server 05).
select count(deptno) from emp where dname = acct.
I want to parameterizet the deptno like..
select count(deptno) from emp where dname = '#dnm#'; (even tried "#dnm#")
It won't work..is it different in DS Server 8?
pl. help. thanks.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
What error message is returned when you use
(Have you tried it without the terminating semi-colon?)
Code: Select all
select count(deptno) from emp where dname = '#dnm#'
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Re: Job parameter in where clause of ODBC stage query (DS Se
You can also try just passing the parameter as #dnm# without quotes and as mentioned the Error mesage would help and if you use the DRS Stage it will give you the output of the sql query passed so you can see how the parameter is being interpreted.Ultramundane wrote:Have you tried the Dynamic RDBMS stage to see if it will work in that stage?ds_is_fun wrote:I have created a job parameter name "dnm".
I need to use the parameter in a count query ...in the ODBC stage (Sql server 05).
select count(deptno) from emp where dname = acct.
I want to parameterizet the deptno like..
select count(deptno) from emp where dname = '#dnm#'; (even tried "#dnm#")
It won't work..is it different in DS Server 8?
pl. help. thanks.
Baig
Nothing is Impossible in this world. TRY ..try till you Succeed.