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 » ESQL Select from Oracle database

Post new topic  Reply to topic
 ESQL Select from Oracle database « View previous topic :: View next topic » 
Author Message
brokerDev
PostPosted: Wed Jan 16, 2008 3:27 pm    Post subject: ESQL Select from Oracle database Reply with quote

Acolyte

Joined: 21 Jun 2006
Posts: 53

Hi,

I am experiencing some strange behaviour when running some ESQL. A snippet of the code is -

DECLARE tmpRef REFERENCE TO OutputLocalEnvironment;
DECLARE myVariable CHAR 'myValue';
SET tmpRef.values = SELECT R.SERVICE,R.VALUES
FROM DATABASE.REFERENCE_VARIABLES AS R
WHERE R.KEY = myVariable;

When I run this, I get no rows returned. However, I do get rows returned if I change the WHERE clause to WHERE R.SERVICE = 'myValue';

I am running in a Windows XP environment with -
WMB runtime 6.0.0.5
WMBT 6.0.2 FP9
Oracle 10.2

Has anyone come across this behaviour?

Thanks
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Jan 16, 2008 3:29 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

I think you have made several typos in your message, revolving around column names.

That is, the two where clauses you posted are entirely different, so it doesn't seem unusual that one would work and the other wouldn't.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
brokerDev
PostPosted: Wed Jan 16, 2008 4:00 pm    Post subject: Reply with quote

Acolyte

Joined: 21 Jun 2006
Posts: 53

Apologies. I hope my typos have not muddied the waters. I should have typed -

DECLARE tmpRef REFERENCE TO OutputLocalEnvironment;
DECLARE myVariable CHAR 'myValue';
SET tmpRef.values[] = SELECT R.SERVICE,R.VALUES
FROM DATABASE.REFERENCE_VARIABLES AS R
WHERE R.KEY = myVariable;

The above returns no rows, but rows are returned if I alter the WHERE clause to WHERE R.KEY = 'myValue';

I've found that using WHERE R.KEY = myVariable; against a DB2 database works ok. The issue seems to be with using that form against data held in an oracle database.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Jan 16, 2008 4:43 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Run User Trace(Debug) and see what it says.
_________________
I am *not* the model of the modern major general.
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 » ESQL Select from Oracle database
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.