Page 1 of 1

Escape character in v8

Posted: Thu Jul 24, 2008 2:37 pm
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

Re: Escape character in v8

Posted: Fri Jul 25, 2008 7:28 am
by pavan_test
Please give me suggestions

Thanks
Mark

Posted: Fri Jul 25, 2008 7:56 am
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.

Posted: Fri Jul 25, 2008 7:13 pm
by ray.wurlod
Please mark the thread as Resolved, and make a post indicating how it was resolved, to aid future searchers.

Posted: Fri Jul 25, 2008 9:40 pm
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? :?

Posted: Fri Jul 25, 2008 10:42 pm
by laknar
From Clause missed.
What is the datatypes for those two columns.

laknar

Posted: Sat Jul 26, 2008 9:03 am
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