Author |
Message
|
jlalbor |
Posted: Tue Oct 11, 2005 3:19 pm Post subject: Update statement Count |
|
|
Apprentice
Joined: 18 Feb 2003 Posts: 38
|
Hi,
we are using Message Broker V5 CSD 5 with DB2 8.1
We have the need to count how many rows where updated with an Update Statement. Is there an indicator like the SQLCODE that has the count of the rows updated with a query?
Thanks. |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Oct 11, 2005 3:28 pm Post subject: Re: Update statement Count |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
jlalbor wrote: |
Hi,
we are using Message Broker V5 CSD 5 with DB2 8.1
We have the need to count how many rows where updated with an Update Statement. Is there an indicator like the SQLCODE that has the count of the rows updated with a query?
Thanks. |
Not like SQLCODE. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
rmurillo |
Posted: Tue Jan 22, 2008 8:40 am Post subject: Re: Update statement Count |
|
|
Newbie
Joined: 24 Mar 2006 Posts: 5
|
jefflowrey wrote: |
jlalbor wrote: |
Hi,
we are using Message Broker V5 CSD 5 with DB2 8.1
We have the need to count how many rows where updated with an Update Statement. Is there an indicator like the SQLCODE that has the count of the rows updated with a query?
Thanks. |
Not like SQLCODE. |
Say Jeff - that link has become broken. I've been banging my head against this same question all day - can you summarize or repost a link?
Thanks!
Bob |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Jan 22, 2008 8:47 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
|
Back to top |
|
 |
rmurillo |
Posted: Tue Jan 22, 2008 9:27 am Post subject: |
|
|
Newbie
Joined: 24 Mar 2006 Posts: 5
|
jefflowrey wrote: |
http://publib.boulder.ibm.com/infocenter/wbihelp/v6rxmx/index.jsp |
Oh snap! Well, I have indeed been poring over the documentation (SQLCODE, etc.), and nothing stands out. I think I've read the "Capturing database state" page about 7 times now. |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Jan 22, 2008 9:32 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I guess it's a question of A+B...
http://publib.boulder.ibm.com/infocenter/wbihelp/v6rxmx/index.jsp?topic=/com.ibm.etools.mft.fp8.doc/ak05850_.htm
Is the page I must have originally linked to.
I can't possibly construct my thinking at the time, except perhaps I was indicating that the function to use was not named something LIKE "SQLCODE", it was named exactly SQLCODE.
I've no idea if SQLCODE tells you how many rows were updated. I kind of assume that this is going to be database specific, and not a broker generic thing. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
rmurillo |
Posted: Tue Jan 22, 2008 12:37 pm Post subject: |
|
|
Newbie
Joined: 24 Mar 2006 Posts: 5
|
Ok thank you Jeff. SQLCODE doesn't tell how many rows are updated. It just returns 100 if no rows were updated, 0 otherwise. I can't find any way at all to get the number I need after much wheel spinning and fruitless experimentation, so I am going to do what I can with "yes or no" rather than "how many". |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Jan 22, 2008 12:48 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
At least on some databases, the return value from Update is equal to the number of rows updated. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
mgk |
Posted: Tue Jan 22, 2008 2:33 pm Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Hi.
At present WMB does not report the number of rows updated as a result of performing an UPDATE against any database type. If you need this functionality you could either use a stored procedure to do the update and return the number or rows updated to WMB via an OUT parameter or you could try raising a requirement through your IBM rep' for this functionality to be considered for a future release.
Regards, _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
|