ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » broker 6.1: select from oracle 8.1

Post new topic  Reply to topic
 broker 6.1: select from oracle 8.1 « View previous topic :: View next topic » 
Author Message
scravr
PostPosted: Tue Nov 04, 2008 8:55 am    Post subject: broker 6.1: select from oracle 8.1 Reply with quote

Partisan

Joined: 03 Apr 2003
Posts: 391
Location: NY NY USA 10021

WMB 6.1:
I have (in compute node) this select into oracle 8.1:

SET Environment.Variables.IntegData[] =
SELECT A.KEY, A.TYPE, A.ID, .......
FROM Database.WMB.DATA AS A
WHERE A.KEY = key

it works fine.

But when adding this order by:
ORDER BY A.UPDATE_TS DESC
I get this RED X (on the left): Syntax error. Valid options include: = <= >= || ......


Any ideas?
Does 6.1 support "ORDER BY" ?


It works OK when I run it directly on oracl.
It also works OK when creating SQL statement on toolkit.
How can I take the SQL statement and put it in the compute node?

Thanks,
Moshe
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Gaya3
PostPosted: Tue Nov 04, 2008 8:27 pm    Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

use PASSTHRU for executing this type of complex SQL queries
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
scravr
PostPosted: Wed Nov 05, 2008 5:17 am    Post subject: Reply with quote

Partisan

Joined: 03 Apr 2003
Posts: 391
Location: NY NY USA 10021

I did try it. Same error RED X.
Manual says: ORDER BY is not supported !!!
Back to top
View user's profile Send private message Send e-mail MSN Messenger
mqjeff
PostPosted: Wed Nov 05, 2008 6:10 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

There's a difference between ESQL Select statement and SQL Select statement.

There's also a difference between ESQL Select statement and ESQL Passthru statement. If you coded the ESQL Passthru statement correctly, it would not show a red X for "ORDER BY".

Unless you didn't rebuild the project after changing the ESQL.
Back to top
View user's profile Send private message
Gaya3
PostPosted: Wed Nov 05, 2008 7:36 pm    Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

post the query over here...let us see how you did it by using PASSTHRU
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
scravr
PostPosted: Mon Nov 10, 2008 5:35 am    Post subject: broker 6.1: select from oracle 8.1 Reply with quote

Partisan

Joined: 03 Apr 2003
Posts: 391
Location: NY NY USA 10021

SET Environment.Variables.IntegData[] =
PASSTHRU (’SELECT T.GET_TS FROM WMB.WMBDATA AS T
WHERE T.WMB_MSG = ?
ORDER BY T.GET_TS DESC'
TO Database.WMB VALUES (’ ’));


must be some syntax error.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
mqjeff
PostPosted: Mon Nov 10, 2008 5:51 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

There is a difference between ESQL Select and SQL Select.

Passthru does not support ESQL Select.
Back to top
View user's profile Send private message
scravr
PostPosted: Mon Nov 10, 2008 6:08 am    Post subject: broker 6.1: select from oracle 8.1 Reply with quote

Partisan

Joined: 03 Apr 2003
Posts: 391
Location: NY NY USA 10021

Are you sure?
see the "PASSTHRU function" in books !
Back to top
View user's profile Send private message Send e-mail MSN Messenger
sridhsri
PostPosted: Mon Nov 10, 2008 6:29 am    Post subject: Reply with quote

Master

Joined: 19 Jun 2008
Posts: 297

The reason you are seeing the error is because of:


TO Database.WMB VALUES (’ ’)

You closed the single quote before. That caused a syntax error. You must have a single string.)
Back to top
View user's profile Send private message
scravr
PostPosted: Mon Nov 10, 2008 6:49 am    Post subject: broker 6.1: select from oracle 8.1 Reply with quote

Partisan

Joined: 03 Apr 2003
Posts: 391
Location: NY NY USA 10021

nonsence !!

please do not reply unless you have experience and/or try it before and can provide samples.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Gaya3
PostPosted: Mon Nov 10, 2008 8:15 pm    Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

Try out this ( I haven't tested)

SET Environment.Variables.IntegData[] = PASSTHRU('SELECT GET_TS FROM WMBDATA WHERE WMB_MSG = ? ORDER BY GET_TS DESC', '10' )


I presume the values, and i hope this will work for you


Find time to go through this too.
http://www.mqseries.net/phpBB2/viewtopic.php?t=12593&highlight=passthru+order
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
scravr
PostPosted: Wed Nov 12, 2008 9:18 am    Post subject: broker 6.1: select from oracle 8.1 Reply with quote

Partisan

Joined: 03 Apr 2003
Posts: 391
Location: NY NY USA 10021

Thanks; your like was very helpfull.
How do I check SQL return code/status/state.... after PASSTHRU ?
Does PASSTHRU return/updates these values?
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Gaya3
PostPosted: Wed Nov 12, 2008 7:29 pm    Post subject: Re: broker 6.1: select from oracle 8.1 Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

scravr wrote:

How do I check SQL return code/status/state.... after PASSTHRU ?
Does PASSTHRU return/updates these values?


I don't think so, and i am not sure. Lets see experts advice on this
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
scravr
PostPosted: Thu Nov 13, 2008 5:34 am    Post subject: broker 6.1: select from oracle 8.1 Reply with quote

Partisan

Joined: 03 Apr 2003
Posts: 391
Location: NY NY USA 10021

PASSTHRU updates the SQL code/status....
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » broker 6.1: select from oracle 8.1
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.