I modified the script to do what I want and it is working well for me. This is for SQL 2000; you can get it to work with SQL 2005 with a minor tweak of the sys tables.
--Part1
CREATE TABLE [DBGrowthRate] (
[DBGrowthID] [int] IDENTITY (1, 1) NOT NULL ,
[DBName] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[DBID] [int] NULL ,
[OrigSize] [decimal](10, 2) NULL ,
[CurSize] [decimal](10, 2) NULL ,
[GrowthAmt] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[InitialDate] [datetime] NULL ,
[ReportDate] [datetime] NULL CONSTRAINT [DF_ReportDate] DEFAULT (getdate())
) ON [PRIMARY]
GO
--PART 2
--Below is the code run weekly to check the growth.
create Proc usp_DBGrowthRate
AS
Select sd.name as DBName, af.dbid, Sum(af.Size) as NumPages, Convert(decimal(10,2),(Sum(Convert(decimal(10,2),af.Size)) * 8)/1024) as CurSize
into #TempDBSize
from master..sysdatabases sd
join master..sysaltfiles af
on sd.dbid = af.dbid
Group by af.dbid, sd.name
Order by sd.name, af.dbid
If Exists (Select Distinct DBName from #TempDBSize where DBName in (Select Distinct DBName from DBGrowthRate))
and Convert(varchar(10),GetDate(),101) > (Select Distinct Convert(varchar(10),Max(InitialDate),101) as InitialDate from DBGrowthRate)
Begin
update dgr
set dgr.CurSize = tds.Cursize
from DBGrowthRate dgr inner join #TempDBSize tds on tds.DBID = dgr.DBID
update dgr
set dgr.GrowthAmt = tds.CurSize - dgr.OrigSize
from DBGrowthRate dgr inner join #TempDBSize tds on tds.DBID = dgr.DBID
update DBGrowthRate
set ReportDate = GetDate()
End
Else
IF Exists (Select Distinct DBName from #TempDBSize where DBName not in (Select Distinct DBName from DBGrowthRate))
Begin
Insert into dbo.DBGrowthRate (DBName, DBID,OrigSize, CurSize, GrowthAmt, InitialDate)
(Select tds.DBName, tds.dbid,
tds.CurSize,
tds.CurSize,
'0.00 MB', GetDate()
from #TempDBSize tds
where tds.dbid not in (Select Distinct DBID from DBGrowthRate dgr where dgr.DBID = tds.DBID)
)
End
DROP TABLE #TempDBSize
GO