[thelist] SQL Problem

aardvark roselli at earthlink.net
Sun May 6 18:54:54 CDT 2001


what's your query look like?  you using a 'group by' clause to get 
all the values for each day?  you can stuff 'em into an array and do 
the math that way... it'll require some SQL and VBScript to do it 
all, depending on your preferred approach... so which part you 
having problems with?

> From: "Marios Andreas Tofarides" <matofarides at hotmail.com>
> 
> I have a problem with an SQL query. I am using ASP with SQL Server 7
> on Windows NT 4.0 Server. The problem is this: I have this table
> 
> Timestamp                        Value
> ------------------------------------
> 01/01/2000  01:00              10.8
> 01/01/2000  02:00                8.6
> 01/02/2000  01:00                9.7
> 01/02/2000  02:00                9.5
> 
> And I want to get the average value for each day. i.e. I want these
> results
> 
> Date                      Average
> 01/01/2000               9.7
> 01/02/2000               9.6




More information about the thelist mailing list