Author |
Message
|
MQMD |
Posted: Mon May 14, 2007 12:56 am Post subject: ORA-00904: |
|
|
Apprentice
Joined: 03 May 2007 Posts: 45
|
Hi I am executing following query from esql
SET OutputRoot.MQMD.ReplyToQ = THE( SELECT ITEM T.ReplytoQ FROM Database.{Source1}.{Schema1}.{Table1} AS T WHERE T.MsgId = InputRoot.MQMD.CorrelId);
The above query is throwing following error
'[DataDirect][ODBC Oracle driver][Oracle]ORA-00904: "T"."MSGID": invalid identifier '
Any hints for this would be of great help
Is MsgId being a blob field here is an issue ?? |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Mon May 14, 2007 1:03 am Post subject: Re: ORA-00904: |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
Please show us table definition.
Quote: |
ORA-00904: invalid identifier Cause: The column name entered is either missing or invalid. |
_________________ Marcin |
|
Back to top |
|
 |
MQMD |
Posted: Mon May 14, 2007 1:10 am Post subject: |
|
|
Apprentice
Joined: 03 May 2007 Posts: 45
|
Sorry posted the wrong one.
The error is
'[DataDirect][ODBC Oracle driver][Oracle]ORA-00932: inconsistent datatypes: expected - got BLOB ' |
|
Back to top |
|
 |
sarat |
Posted: Mon May 14, 2007 1:16 am Post subject: |
|
|
 Centurion
Joined: 29 Jun 2005 Posts: 136 Location: India
|
Then check the data type and CAST the incoming message to that data type _________________ With Regards,
Sarat. |
|
Back to top |
|
 |
sarat |
Posted: Mon May 14, 2007 1:17 am Post subject: |
|
|
 Centurion
Joined: 29 Jun 2005 Posts: 136 Location: India
|
I think you should CAST the incoming correlID to INTEGER while assigning to Msgid. _________________ With Regards,
Sarat. |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Mon May 14, 2007 1:26 am Post subject: |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
|
Back to top |
|
 |
MQMD |
Posted: Mon May 14, 2007 1:27 am Post subject: |
|
|
Apprentice
Joined: 03 May 2007 Posts: 45
|
Following modifications have solved the problem
THE( SELECT ITEM T.ReplytoQ FROM Database.{Source1}.{Schema1}.{Table1} AS T WHERE CAST(T.MsgId AS BLOB) = CAST(InputRoot.MQMD.CorrelId AS BLOB))
Thanks |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Mon May 14, 2007 1:28 am Post subject: |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
sarat wrote: |
I think you should CAST the incoming correlID to INTEGER while assigning to Msgid. |
CAST to INTEGER ?
Why ? _________________ Marcin |
|
Back to top |
|
 |
sarat |
Posted: Mon May 14, 2007 1:33 am Post subject: |
|
|
 Centurion
Joined: 29 Jun 2005 Posts: 136 Location: India
|
marcin.kasinski wrote :
Quote: |
sarat wrote:
I think you should CAST the incoming correlID to INTEGER while assigning to Msgid.
CAST to INTEGER ?
Why ? |
Sorry for that...i suggested him to CAST the correlID...tht's it _________________ With Regards,
Sarat. |
|
Back to top |
|
 |
Vitor |
Posted: Mon May 14, 2007 1:36 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
sarat wrote: |
marcin.kasinski wrote :
Quote: |
sarat wrote:
I think you should CAST the incoming correlID to INTEGER while assigning to Msgid.
CAST to INTEGER ?
Why ? |
Sorry for that...i suggested him to CAST the correlID...tht's it |
msgId and correlId are always BLOB in database terms. Nothing else matches the byte representations that they are. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
sarat |
Posted: Mon May 14, 2007 1:41 am Post subject: |
|
|
 Centurion
Joined: 29 Jun 2005 Posts: 136 Location: India
|
agreed!!!
So wat's the differnce b/n these 2 codes??
Code: |
SET OutputRoot.MQMD.ReplyToQ = THE( SELECT ITEM T.ReplytoQ FROM Database.{Source1}.{Schema1}.{Table1} AS T WHERE T.MsgId = InputRoot.MQMD.CorrelId); |
AND
Code: |
THE( SELECT ITEM T.ReplytoQ FROM Database.{Source1}.{Schema1}.{Table1} AS T WHERE CAST(T.MsgId AS BLOB) = CAST(InputRoot.MQMD.CorrelId AS BLOB)) |
Why the first one is not working !!!! _________________ With Regards,
Sarat. |
|
Back to top |
|
 |
Vitor |
Posted: Mon May 14, 2007 1:45 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
sarat wrote: |
Why the first one is not working !!!! |
Depends a lot on the error message it's throwing!
Also what database & ODBC you're using, and if the Database is assoicated with a message set or source.
CASTing to INTEGER will never be the answer though. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
sarat |
Posted: Mon May 14, 2007 1:50 am Post subject: |
|
|
 Centurion
Joined: 29 Jun 2005 Posts: 136 Location: India
|
I've told sorry for that CASTING to INTEGER.
MQMD wrote :
Quote: |
The error is
'[DataDirect][ODBC Oracle driver][Oracle]ORA-00932: inconsistent datatypes: expected - got BLOB ' |
So i thought there's a mismatch in data types...i suggested him to CAST...But i've given statement wrongly INTEGER instead of BLOB....anyways he got the right thing!!!  _________________ With Regards,
Sarat. |
|
Back to top |
|
 |
Vitor |
Posted: Mon May 14, 2007 1:52 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
sarat wrote: |
I've told sorry for that CASTING to INTEGER.
MQMD wrote :
Quote: |
The error is
'[DataDirect][ODBC Oracle driver][Oracle]ORA-00932: inconsistent datatypes: expected - got BLOB ' |
So i thought there's a mismatch in data types...i suggested him to CAST...But i've given statement wrongly INTEGER instead of BLOB....anyways he got the right thing!!!  |
If it's fixed, it's a victory.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|