Passing 2 values in one parameters

Formally known as "Mercator Inside Integrator 6.7", DataStage TX enables high-volume, complex transactions without the need for additional coding.

Moderators: chulett, rschirm

Post Reply
Hope
Participant
Posts: 97
Joined: Sun May 13, 2007 2:51 pm
Contact:

Passing 2 values in one parameters

Post by Hope »

I have a query.
SELECT col1 FROM table where Col2 in('A','B').

I declared a parameter in DSjob as indicator.
#indicator#.
SELECT col1 FROM table where Col2 in(#indicator#)

I want to pass 2values for this #indicator#.

The DD log shows
that job fails because of the bad query
SELECT col1 FROM table where Col2 in(A,B).

The job is not picking the the quotes. Though I gives the quotes.
Can I pass two values in one parameter or do I need give two parameters?.

Please suggest
rep
Participant
Posts: 82
Joined: Tue Jun 19, 2007 8:04 am
Location: New York City

....

Post by rep »

It's been such a long time since I've use the varible in the mdq, but from what I remember, I had problem with the quotes also.

First though, and with it being that long ago, this may not apply, I'd cut out one of the values from #indicator# to make sure that is exactly what the problem is, or maybe you've already tried that.

maybe try two quotes? Or use the encoding value for the quotes <<44>> (or whatever it is), like FTP URL encoding.

There may have been a trick to it, like put the quotes in some unlikley place, it's just been that long and at another job, so I can't even look it up. =(
rep
Participant
Posts: 82
Joined: Tue Jun 19, 2007 8:04 am
Location: New York City

Post by rep »

"The pseudo values are stored in the MDQ file and can only be changed in the
Define Variables dialog. Also, if the variable you are defining is a text string, you
must enclose the value in single quotation marks."


Maybe try double quotes.
Hope
Participant
Posts: 97
Joined: Sun May 13, 2007 2:51 pm
Contact:

Post by Hope »

I did try the double quotes. It doesn't work.
rep
Participant
Posts: 82
Joined: Tue Jun 19, 2007 8:04 am
Location: New York City

...

Post by rep »

Two of the single quotes in a row on each side?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Moderator: please move to parallel forum
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Ramani
Participant
Posts: 58
Joined: Mon Oct 08, 2007 1:51 am

Post by Ramani »

"'A','B'"

could you try passing like double quote and then 'A','B' and then double quote. I have not tried this. But this is just a suggestion.
Amara
Participant
Posts: 3
Joined: Tue Aug 01, 2006 3:36 am

Post by Amara »

Do you still have this issue? If yes try using
'"+xyz+"' ie single quotes then double quotes and then + .....
It should work.
Amara
jvmerc
Participant
Posts: 94
Joined: Tue Dec 02, 2003 12:57 pm

Post by jvmerc »

this is not a TX question.
Post Reply