Author |
Message
|
rkford11 |
Posted: Thu Oct 07, 2004 11:38 am Post subject: retrieve data from database |
|
|
Partisan
Joined: 06 Jun 2004 Posts: 316
|
i am trying to retrieve data from the database using the following statement.
SET OutputRoot.XML.MESSAGE.CK = SELECT COL_1 FROM Database.SCHEMA.TABLE WHERE COL_2 = InputRoot.XML.MESSAGE.CB
please let me know where i am making the mistake. |
|
Back to top |
|
 |
RocknRambo |
Posted: Thu Oct 07, 2004 11:47 am Post subject: |
|
|
Partisan
Joined: 24 Sep 2003 Posts: 355
|
I think ur missing the Keyword.. 'THE'
-sanu |
|
Back to top |
|
 |
rkford11 |
Posted: Thu Oct 07, 2004 11:58 am Post subject: |
|
|
Partisan
Joined: 06 Jun 2004 Posts: 316
|
sanu_newbie wrote: |
I think ur missing the Keyword.. 'THE'
-sanu |
Even though i put the key word THE i am not able to retrieve it.
Thanks |
|
Back to top |
|
 |
RocknRambo |
Posted: Thu Oct 07, 2004 12:02 pm Post subject: |
|
|
Partisan
Joined: 24 Sep 2003 Posts: 355
|
what error r u getting....any SQLCODE...
can u post ur exact ESQL???
-sanu |
|
Back to top |
|
 |
JT |
Posted: Thu Oct 07, 2004 12:21 pm Post subject: |
|
|
Padawan
Joined: 27 Mar 2003 Posts: 1564 Location: Hartford, CT.
|
Give this a try:
SET OutputRoot.XML.MESSAGE.CK[] = SELECT T.COL_1 FROM Database.SCHEMA.TABLE AS T WHERE T.COL_2 = InputRoot.XML.MESSAGE.CB; |
|
Back to top |
|
 |
rkford11 |
Posted: Thu Oct 07, 2004 1:56 pm Post subject: |
|
|
Partisan
Joined: 06 Jun 2004 Posts: 316
|
sanu_newbie wrote: |
what error r u getting....any SQLCODE...
can u post ur exact ESQL???
-sanu |
This is the error.
BIP2432E: (ABC_Compute.CopyEntireMessage, 3.45) : The correlation name 'COL_1' is not valid. Those in scope are: , Environment, InputLocalEnvironment, OutputLocalEnvironment, InputRoot, InputBody, InputProperties, OutputRoot, InputExceptionList, OutputExceptionList, InputDestinationList, OutputDestinationList, TABLE.
The first element of a field reference must be a valid correlation name, from those in scope. This message may sometimes be due to an incorrectly formed or spelled expression which is not intended to be a field reference being parsed as if it were a field reference because the parser does not recognize it.
Correct the syntax of the expression and redeploy the message flow. |
|
Back to top |
|
 |
RocknRambo |
Posted: Thu Oct 07, 2004 2:13 pm Post subject: |
|
|
Partisan
Joined: 24 Sep 2003 Posts: 355
|
okie....
r u just..trying with this
Code: |
SELECT COL_1 FROM Database.SCHEMA.TABLE |
like here COL_1 shud be a reference. there so I was asking ur ESQL code, but anyways...
try this...
Code: |
THE(SELECT DB.COL_1 FROM Database.SCHEMA.TABLE AS DB) |
if ur still facing the pblm..... post ur ESQL
-sanu |
|
Back to top |
|
 |
JT |
Posted: Thu Oct 07, 2004 6:22 pm Post subject: |
|
|
Padawan
Joined: 27 Mar 2003 Posts: 1564 Location: Hartford, CT.
|
Oops, forgot the parens:
SET OutputRoot.XML.MESSAGE.CK[] = (SELECT T.COL_1 FROM Database.SCHEMA.TABLE AS T WHERE T.COL_2 = InputRoot.XML.MESSAGE.CB); |
|
Back to top |
|
 |
|