Are you sure that you can't use the GROUP BY clause?
Saludos, Marcelo. "Don Seiler" <Don.Seiler@Ce To: Michael Peppler <[EMAIL PROTECTED]> llcom.com> cc: Marcelo Guelfi/Uruguay/Contr/IBM@IBMUY, <[EMAIL PROTECTED]> Subject: Re: Looping through recordset twice 01/11/2001 16:13 Please respond to "Don Seiler" Basically, when I get to a new group number. The record set is ordered by group number, so all records in a group are together. As I'm looping through records in a group, I do some evaluation and add values to variables. When I get to a new group number, I look at the values. If they meet my criteria I add the last group number to an array. Then when I'm done I planned to loop again through the record set and if the group number matches one in the array I'd print it. This is probably horribly inefficient and I'm leaning towards saving the records to a tmp array and if they qualify saving that to master array for later printing. Don. On Thu, 1 Nov 2001, Michael Peppler wrote: > Don Seiler writes: > > Actually the nature of the problem is what stopped me from doing this. > > > > I won't know which records I want until I look at the group of them. > > > > Example: I have a table of records. There is a "groupnum" column. Many > > records have the same "groupnum", i.e. they are in the same group. I'm > > only interested in selecting the group as a whole. I will only know if I > > want this group based on examining all of the records for that group. > > Hmmm - what condition determins that a group is complete? >