[thelist] SQL Problem

Marios Andreas Tofarides matofarides at hotmail.com
Sun May 6 19:28:44 CDT 2001


I don't use a 'group by' clause - that would be the best- because I don't
know how to do it. I tried using VBScript to get the results by doing one
query of the database for each day, but this is way too slow. I just want
some ideas on how to do it. Thank you
----- Original Message -----
From: "aardvark" <roselli at earthlink.net>
To: <thelist at lists.evolt.org>
Sent: Monday, May 07, 2001 2:54 AM
Subject: Re: [thelist] SQL Problem


>
> 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
>
> ---------------------------------------
> For unsubscribe and other options, including
> the Tip Harvester and archive of TheList go to:
> http://lists.evolt.org Workers of the Web, evolt !
>




More information about the thelist mailing list