Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 monthly averages from a year's records.

Author  Topic 

jazzym
Yak Posting Veteran

94 Posts

Posted - 2001-10-18 : 21:30:05
Hi, Here's my dilema.

I have (at least) a years worth of records in my database. Each record has two fields, a timestamp so i know when it was made and another field with my value in.

I want to create a report showing monthly averages of those values.

I'm more of a vbscript man myself and the vbscript / asp way seemed way to over complicated.

Is there a good way in SQL Server to create a stored procedure or view of some kinda that could calculate these avaerages and give me 12 records, one for each month, with the monthly average in.

Thanx in advance!!
   

- Advertisement -