|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
PASSTHRU |
« View previous topic :: View next topic » |
Author |
Message
|
lamtbs |
Posted: Wed Mar 29, 2006 2:22 am Post subject: PASSTHRU |
|
|
Acolyte
Joined: 07 Nov 2005 Posts: 57 Location: Hong Kong
|
Hi all,
I'm trying the PASSTHRU function, so I use a statement that works before, and add PASSTHRU to it, but got the following SQL error
Any idea why the difference?
Thanks!
SET LocalEnvironment.Variables.Logical.KeyEntry[] =
PASSTHRU('SELECT L.LogicalTableName, L.PhysicalTableName,
L.ATTRIBUTE, L.SEQ,
L.ColumnName, L.ColumnLength
FROM Database.LOGICAL_TABLE AS L
WHERE L.LogicalTableName = Root.XML.go.key'
);
and it return error in runtime : Text = [IBM][CLI Driver][DB2/NT] SQL0204N
"DATABASE.LOGICAL_TABLE" is an undefined name. SQLSTATE=42704 |
|
Back to top |
|
 |
mgk |
Posted: Wed Mar 29, 2006 2:34 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Well, as the Error says,
Quote: |
"DATABASE.LOGICAL_TABLE" is an undefined name. |
PASSTHRU sends the string you give it to the DB exactly with no changes. PASSTHRU can only be used to talk to a DB so there is not need to use the Database correlation name. Remove it.
When you have do that, the next error you will hit is that the DB has no idea what "Root.XML.go.key" is. Look up PASSTHRU in the docs for examples of usage, and always use parameter markers (?) where you can. Remember PASSTHRU has to be given SQL that will work on your DB's command line (with the exception of parameter markers) and cannot be given ESQL exactly as you DB will not understand it.
Regards, _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
Duke |
Posted: Sun Apr 02, 2006 9:57 pm Post subject: |
|
|
 Apprentice
Joined: 09 Mar 2004 Posts: 49 Location: Belgium
|
If you want to put a parameter you caould use:
SET LocalEnvironment.Variables.Logical.KeyEntry[] =
PASSTHRU('SELECT L.LogicalTableName, L.PhysicalTableName,
L.ATTRIBUTE, L.SEQ,
L.ColumnName, L.ColumnLength
FROM DBName.LOGICAL_TABLE AS L
WHERE L.LogicalTableName = (?)', Root.XML.go.key
); _________________ Pierre Richelle
Engineer
IBM Certified MQSeries Developper V5.3
IBM Certified WMQ Administration V6 |
|
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
|
|
|
|