I am having a bit of trouble with the following, I have a table for tracking DB growth and a procedure to populate the table that runs once a week (http://sqljourney.wordpress.com/2013/02/13/sql-server-track-database-size-growth-trend/). The issue is that i wish to determine the growth in Mb/Gb between entries. here is an example of the query output:
DB_NAME CollectionDate SizeInMB
SSISDB 2014-02-19 07:57:06.313 47
tempdb 2014-02-18 17:29:29.273 8
tempdb 2014-02-19 07:57:06.313 8
Trend_data 2014-02-18 17:29:29.273 875
Trend_data 2014-02-19 07:57:06.313 1055
I was wanting to add a "growth" column to the end to calculate the difference between the current collection date and the one prior.
I have tried a few things
(datediff) but seem to be getting further away, could anyone perhaps help point me in the right direction?