Job Parameter removing quotes

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
myukassign
Premium Member
Premium Member
Posts: 238
Joined: Fri Jul 25, 2008 8:55 am

Job Parameter removing quotes

Post by myukassign »

Hi...

I have a simple job like the following.

ODBC Stage ---------> Transformer ---------> Dataset.

In odbc, I am using a sql with an "IN" statement where in I want to give comma separted values. This comma separated values I want to give as a job parameter.

select X,Y,Z from TABA where state in ('A','B','C')

Even though I pass 'A','B','C' in the job parameter, datastage automatically remove that and the SQL is running with 'A,B,C'. Why it is automatically removing that? How to prevent or any alternative method to pass my desired value there.

Please request to help me here.
Last edited by myukassign on Sat Jun 11, 2011 10:29 am, edited 1 time in total.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

So it is removing quotes rather than colons. And that is a well documented "feature" of DataStage, it does that by default. If you had searched here, you would find the fix is to escape them.
-craig

"You can never have too many knives" -- Logan Nine Fingers
myukassign
Premium Member
Premium Member
Posts: 238
Joined: Fri Jul 25, 2008 8:55 am

Post by myukassign »

Yes, I searched and got my solution. Thanks Chullet.

For the interest of anyone who search for this the solution is here.

viewtopic.php?t=128561&highlight=
Post Reply