ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » PassThru and single quotes

Post new topic  Reply to topic
 PassThru and single quotes « View previous topic :: View next topic » 
Author Message
mmarq
PostPosted: Sun Sep 29, 2002 3:17 pm    Post subject: PassThru and single quotes Reply with quote

Acolyte

Joined: 19 Sep 2002
Posts: 74
Location: Newton, MA

If I have a select statement in a compute node as:


Environment.Variables= PASSTHRU('select t.* from myTable
where acctno = '123456789'
and pid = ?
and substr(pid,3,4) not in ('7H6', '8h6', '8H2')', "InputBody"."PID");

I have two problems:

The passthru statement thinks that the first single quote it sees is the end of the statement and then tries to evaluate 123456789.
It also does not pass through as it should the "substr" statement which is a valid SQL statement (and is why I am using passthu).

Thanks in advance,
Melissa
_________________
M Marquis
Back to top
View user's profile Send private message Visit poster's website AIM Address
kirani
PostPosted: Sun Sep 29, 2002 8:43 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Try this ..
Code:

Environment.Variables= PASSTHRU('select t.* from myTable
where acctno = ?
and pid = ?
and substr(pid,3,4) not in (?, ?, ?)', '123456789',"InputBody"."PID",'7H6','8h6','8H2');

_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
Segs
PostPosted: Tue Oct 01, 2002 11:34 pm    Post subject: Reply with quote

Voyager

Joined: 04 Oct 2001
Posts: 78
Location: Zurich Financial Services

An alternative is to use '' instead of '
Back to top
View user's profile Send private message Send e-mail
gmabrito
PostPosted: Fri Apr 18, 2003 1:15 pm    Post subject: Reply with quote

Apprentice

Joined: 19 Mar 2002
Posts: 35

what about functions within Oracle that use the single quotes.

this doesn't work

SET OutputRoot.XML[] = PASSTHRU('SELECT to_char(sysdate, ''YYYYMMDDHH24MISS'') from dual');

this doesn't work either

SET OutputRoot.XML[] = PASSTHRU('SELECT ? FROM dual', "to_char(sysdate, 'YYYYMMDDHH24MISS')");

any help here would be appreciated.

Thanks,
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » PassThru and single quotes
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.