Author |
Message
|
nganeshp |
Posted: Mon Oct 18, 2004 7:32 am Post subject: WBIMB V5.0 esql issue |
|
|
Novice
Joined: 17 Sep 2004 Posts: 18
|
Hi All,
Sorry to ask such a silly question, But i could not find the solution for the below issue.
I created a simple message flow in WBIMB V5.0, with one input node, one output node and a compute node. in the compute node properties, i typed my datasource name(i have db2 database). i have created the required ODBC connection for that. i typed the following code in compute node
Set OutputRoot.XML.Name.FirstName = ('SELECT FIRSTNAME FROM Database.TEST.Employee WHERE ID = '1');
Set OutputRoot.XML.Name.FirstName = ('SELECT T.FIRSTNAME FROM Database.TEST.Employee AS T WHERE T.ID = '1');
where TEST is my schema name. the funny part was that the first statement did not give any syntax warning message, but the second statement gave me a warning message stating that "COULD NOT RESOLVE T.FIRSTNAME".
Any one please tell me what is the problem!!!
Ganesh _________________ Hi |
|
Back to top |
|
 |
JT |
Posted: Mon Oct 18, 2004 7:55 am Post subject: |
|
|
Padawan
Joined: 27 Mar 2003 Posts: 1564 Location: Hartford, CT.
|
Your quotes are unmatched:
Quote: |
Set OutputRoot.XML.Name.FirstName = ('SELECT T.FIRSTNAME FROM Database.TEST.Employee AS T WHERE T.ID = '1''); |
|
|
Back to top |
|
 |
nganeshp |
Posted: Mon Oct 18, 2004 8:04 am Post subject: |
|
|
Novice
Joined: 17 Sep 2004 Posts: 18
|
sorry, typing error. in the statment i used a variable instead of '1'.
Set OutputRoot.XML.Name.FirstName = ('SELECT FIRSTNAME FROM Database.TEST.Employee WHERE ID = <<varable name>>');
Set OutputRoot.XML.Name.FirstName = ('SELECT T.FIRSTNAME FROM Database.TEST.Employee AS T WHERE T.ID = <<varable name>>'); |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Oct 18, 2004 8:07 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Why are you wrapping the entire select statement in single quotes? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
nganeshp |
Posted: Mon Oct 18, 2004 8:17 am Post subject: |
|
|
Novice
Joined: 17 Sep 2004 Posts: 18
|
oops, sorry once again,
here is my compute node code...
DECLARE chrID CHAR;
SET chrID = InputRoot.XML.Name.ID;
Set OutputRoot.XML.Name.FirstName = (SELECT FIRSTNAME FROM Database.TEST.Employee WHERE ID = chrID);
Set OutputRoot.XML.Name.FirstName = (SELECT T.FIRSTNAME FROM Database.TEST.Employee AS T WHERE T.ID = chrID);
The bottom line of my question is both are the same sql query, the second query uses Alias name. the first statment is not showing any warning message, but the second query gives warning message. why? |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Oct 18, 2004 8:27 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I'd assume that the first phrasing doesn't cause the Tooling to try and resolve anything, whereas the second phrasing does cause the Tooling to try and verify your query.
I bet if you import your database definitions, the warning will go away. Someone else asked about how to resolve these warning messages recently, and was provided with instructions on how to import the database definitions. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
RocknRambo |
Posted: Mon Oct 18, 2004 1:54 pm Post subject: |
|
|
Partisan
Joined: 24 Sep 2003 Posts: 355
|
The warning message comes when we use ref to the table....
but I find those r harmless..though the warning symbols stays but it does deploy and provide the output.
Jeff,
how do we inport the database definitions ???
rr |
|
Back to top |
|
 |
kirani |
Posted: Mon Oct 18, 2004 1:57 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Try last post in this thread,
http://www.mqseries.net/phpBB2/viewtopic.php?t=17939 _________________ 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 |
|
 |
RocknRambo |
Posted: Mon Oct 18, 2004 2:00 pm Post subject: |
|
|
Partisan
Joined: 24 Sep 2003 Posts: 355
|
Quote: |
Jeff,
how do we inport the database definitions ??? |
oops I got it... |
|
Back to top |
|
 |
nganeshp |
Posted: Mon Oct 18, 2004 3:11 pm Post subject: |
|
|
Novice
Joined: 17 Sep 2004 Posts: 18
|
Hi All,
Thanks for the replies. I understood how to import data definition into the project.
Ganesh |
|
Back to top |
|
 |
|