By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,034 Members | 1,777 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,034 IT Pros & Developers. It's quick & easy.

Process Records In A Table In Groups

P: n/a
Liz
I have a table of about 10,000 records where each record has a numeric field
named RecIdent. The value of RecIdent starts at 1 and is not sequential. For a
given RecIdent, there may be only one record with that value or there could be
multiple records with the same value. A sample of records looks like:

PK RecIdent
1 1
2 3
3 3
4 5
5 6
6 6
7 6
8 6
9 11
10 17
11 17

Starting at RecIdent 1, I need to process all the records with the same RecIdent
as a group then move to the next value of RecIdent and process all records with
that RecIdent as a group. In the above example, I would process 1 record in the
first group with RecIdent 1, 2 records in the next group with RecIdent 3, 1
record in the next group with RecIdent 5, 4 records in the next group with
RecIdent 6, etc. I need to do this until I have processed all the records in the
table.

I'm looking for help on how to loop through the RecIdent field, pick the groups
of records with the same RecIdent, process those records and then go to the next
group of records and process those records until I have processed all the
records in the table. It seems like it takes a For/Next loop but I don't know
how to set it up.

Thanks for an help anyone can give!

Liz
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Liz wrote:
Starting at RecIdent 1, I need to process all the records with the same RecIdent
as a group then move to the next value of RecIdent and process all records with
that RecIdent as a group.


What process?

I don't mean to hamper you, but maybe you are trying to solve something
procedurally that can be solved using SQL.
--
Bas Cost Budde
http://www.heuveltop.org/BasCB
but the domain is nl

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.