View previous topic :: View next topic
|
Author |
Message |
bashir ahmad
New User
Joined: 11 May 2013 Posts: 6 Location: canada
|
|
|
|
I use decalre cursor for a DB2 table for group of items as follows:
Code: |
Item PART#
1 yyy zzz uuu xxx
2 abc efg klm kkk
2 abc efg klm LLL 5678
2 abc efg klm MMM 5679
4 abc efg klm kkk
4 abc efg klm LLL 5680
5 abc efg klm kkk
5 abc efg klm LLL 5682
5 abc efg klm MMM 5684 |
Code'd
I select group of same Items which has more than two rows having parts# also part no as space is allowed.
Q. After Declare select I want how many required rows selected ???
Any one reply to resolve this iseue thanks. Bashir |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
You need to repost showing data that goes with your "requirement".
None of the data posted has more than 2 part#s?
Post the declare cursor. Post the other SQL you are using.
Post the "answer" you want when your process is executed on the improved sample data.
Use the Code tag to preserve alignment and improve readability. |
|
Back to top |
|
|
bashir ahmad
New User
Joined: 11 May 2013 Posts: 6 Location: canada
|
|
|
|
Hi
How to find how many rows selected while using Declare Cursor for DB2 table for a selected criteria, thanks Bashir |
|
Back to top |
|
|
Bang_1
New User
Joined: 08 May 2009 Posts: 39 Location: Bangalore
|
|
|
|
How about using COUNT(*) |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
search the forum for row-count |
|
Back to top |
|
|
|