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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sum, Min, Max

Status
Not open for further replies.

ironmunk

Technical User
Aug 21, 2001
51
CA
How do you store the value from the following SQL commands to a variable

MIN, MAX, SUM, AVG
 

Could you give an example of what you are doing? Do you have a query? Are you opening a record set? Are you working in VB code? Terry L. Broadbent
faq183-874 contains some tips and ideas for posting questions in these forums. Please review it and comment if you have time.
NOTE: Reference to the FAQ is part of my signature and is not directed at any individual.
 
sorry, here you go

ssql = "select sum (inputbytes) as test from DB"
Set rstArchive = LANarchiveDB.OpenRecordset(ssql)
Do Until rstArchive.EOF = True
temp = <what goes here>
rstArchive.MoveNext
Loop
rstArchive.Close

 

temp = rstArchive!test Terry L. Broadbent
faq183-874 contains some tips and ideas for posting questions in these forums. Please review it and comment if you have time.
NOTE: Reference to the FAQ is part of my signature and is not directed at any individual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top