Perhaps I'm missing it, then. basically my query is this:
select cust_no, acct_type, acct_status, group_num from cust,acct where cust.cust_no=acct.cust_no order by group_num the values of acct_type and acct_status for all of the records in a group determine if I want that group or not. I don't think I can make that determination until I've gone through the recordset though. -- Don Seiler [EMAIL PROTECTED] Database Administrator / Sr Software Engineer NSightTel Billing LLC Phone: 920.617.7501 1580 Mid Valley Drive Fax: 920.617.7493 De Pere, WI 54115 Cell: 920.606.3240 Pager: [EMAIL PROTECTED] / 920.613.2000 On Thu, 1 Nov 2001, Marcelo Guelfi wrote: > > 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? > > > > > > > >