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 » Limiting database rows on Database node WMB6.0

Post new topic  Reply to topic
 Limiting database rows on Database node WMB6.0 « View previous topic :: View next topic » 
Author Message
Qadeer_824
PostPosted: Mon Sep 14, 2009 9:34 am    Post subject: Limiting database rows on Database node WMB6.0 Reply with quote

Acolyte

Joined: 04 Oct 2007
Posts: 59

Hi,
I am trying to work on a message flow that would retrieve rows from a database table, generate an output structure for each retrieved row and then update a particular column of that row to mark it as "processed".

I could use a database node (which effectively is just a Compute node) to retrieve and then have a compute node to create the output structure and then use a database node to update the row.

However, if there are a lot of rows on the database (say 10K or 100K), how can i limit the number of rows retrieved ?

Is there an alternate solution to this instead of using Database node?

Note: I am using WMB 6.0 and hence cannot use the Database Retrieve node (present on WMB 6.1).

Your help is highly appreciated.

Thanks in advance
Qadeer..
Back to top
View user's profile Send private message Yahoo Messenger
smdavies99
PostPosted: Mon Sep 14, 2009 10:22 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

I'd think about using PASSTHRU and formulating an SQL Command in the versions of SQL that is being used by the database (yes there are differences)

In SQL Server something like

select top 20 from .... where .... and processed = 'False'

This would limit the select to the first 20 rows.
Then you could process them as you wish.
Finally you can build an update statement to turn processed = 'True'
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Limiting database rows on Database node WMB6.0
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.