Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a new recordset from an existing recorset?

Status
Not open for further replies.

THEGREEK

Technical User
Aug 17, 2000
51
CA
Hi,

I've been stumped trying to do this from an SQL connection :(

I've retrieved a recordset from an sql server, now for each value in column 2 of this recordset, I want to check for a value of 'INSTALL' then MoveNext and so on...until i get a count of all the records in this column that have a value of 'INSTALL', now i woule like to MoveFirst and do a similar count for all values in this column with a value of 'CANCEL' etc etc...Ultimately now that I have the values i want a create a new recordset with these values and display in a table with the headings & values:

for example,

STATUS Volume % of Total
INSTALL 438 65%
CANCEL 241 35%
TOTALS 679 100%

Thanks in advance,


[sig][/sig]
 
Maybe you could loop through the recordset only once by using a case statement

Case "Install"
InstallCounter+=1
Case "Cancel"
CancelCounter+=1

Just a thought instead of going through the recordset multiple times. [sig]<p>Crystal<br><a href=mailto:crystals@genesis.sk.ca>crystals@genesis.sk.ca</a><br><a href= > </a><br>--------------------------------------------------<br>
Experience is one thing you can't get for nothing.<br>
-Oscar Wilde<br>
[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top