|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
ESQL Select from Oracle database |
« View previous topic :: View next topic » |
Author |
Message
|
brokerDev |
Posted: Wed Jan 16, 2008 3:27 pm Post subject: ESQL Select from Oracle database |
|
|
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 |
|
 |
jefflowrey |
Posted: Wed Jan 16, 2008 3:29 pm Post subject: |
|
|
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 |
|
 |
brokerDev |
Posted: Wed Jan 16, 2008 4:00 pm Post subject: |
|
|
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 |
|
 |
jefflowrey |
Posted: Wed Jan 16, 2008 4:43 pm Post subject: |
|
|
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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|