Could not pass PARAMETERS to odbc stage

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
xch2005
Participant
Posts: 85
Joined: Fri Apr 29, 2005 3:13 am
Location: India

Could not pass PARAMETERS to odbc stage

Post by xch2005 »

Hi,

I need to pass data values (as parameter) to sql in the odbc enterprise stage. SQL works fine if the where clause is hardcoded with dates as,

select ...
from ...
where ...
and d1 > '20081010' and d2 < '20081020'

Is it parameter cannot be passed to an odbc stage? I tried passing as parameter, the job completed successfully but no rows were loaded.

Please let me now your valuable suggestions.

Thanks
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Of course parameters can be used in the stage. You'd have to show us your syntax to know what went wrong. Guessing you may not have enclosed the parameter name in hashes / pound signs.
-craig

"You can never have too many knives" -- Logan Nine Fingers
xch2005
Participant
Posts: 85
Joined: Fri Apr 29, 2005 3:13 am
Location: India

Post by xch2005 »

The parameters which are passed are d1 and d2 and used as shown below.

select ...
from ...
where ...
AND e.added_datetime >#d1# AND e.added_datetime < #d2#

It did not work.

Now I am able to run successfully, the only thing which I had missed was the quotes ie. '#d1#' and '#d2#'

Craig, thanks because on reading your post I remembered this.

Thanks
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Yup, exactly right. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply