Escape character in v8

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
pavan_test
Premium Member
Premium Member
Posts: 263
Joined: Fri Sep 23, 2005 6:49 am

Escape character in v8

Post by pavan_test »

Im passing an Sql query as a parameter to the job
e.g select name where state in ('NY','NJ')
The query works fine in Oracle but when I pass it as a parameter to the job, it fails. On going through the log I saw that the query was not getting coverted properly.

The log was as follows :
Oracle_Enterprise_0: The provided query statement did not prepare correctly;
please verify that your statement is correct;
statement: SELECT name where state in (NY,NJ).

The quotes were removed from the in clause,hence the failure.
I tried with an escape character
select name where state in (\'NY\',\'NJ\')

The above code works properly in 7.5, but fails in 8.0.2

can anyone suggest me how do I apply escape character in data stage version 8.0.2

Thanks
Mark
pavan_test
Premium Member
Premium Member
Posts: 263
Joined: Fri Sep 23, 2005 6:49 am

Re: Escape character in v8

Post by pavan_test »

Please give me suggestions

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

Post by chulett »

Suggest continued patience, that or ask your offiicial support provider. I for one don't have access to 8.x to answer a question of this nature.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Please mark the thread as Resolved, and make a post indicating how it was resolved, to aid future searchers.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Why ask for "Resolved" when there's nothing to indicate it ever was? Now it just seems like it is "resolved" because you told Mark to mark it that way. What am I missing here? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
laknar
Participant
Posts: 162
Joined: Thu Apr 26, 2007 5:59 am
Location: Chennai

Post by laknar »

From Clause missed.
What is the datatypes for those two columns.

laknar
fridge
Premium Member
Premium Member
Posts: 136
Joined: Sat Jan 10, 2004 8:51 am

Post by fridge »

I havent got a solution but we have hit a simalar problem with quotes in parameters being used as properties in PX stages.

e.g. we had a job that used a parameter to specific the syntax for a generic stage - same as u works on 7.5 not on 8

we have raised a support issue with IBM and will let you know the outcome - but because you suggest the problem (like mine) occurs in V8 only then feel more a bug than a coding error

sorry cant be more help
Post Reply