February 11, 2008 at 1:38 pm
I have a table which have all databse information. I need to select all the databses with their size growth for the month of january. I was able to write the query for getting that information, but I am having one problem, the problem is that I am getting two same date-time for each day for all database. I need only one date-time for each day. how do I do that. here what I have written the query.
select dbname,collect_time,totalbytes/1024/1024 as 'Total Space (mb)',usedbytes/1024/1024
as 'Used Space (mb)'
from dbatools_filesize
where collect_time>='2008-01-01' and collect_time<'2008-02-01'
order by dbname, collect_time,totalbytes,usedbytes
February 11, 2008 at 6:49 pm
Only way I can see that happening is if dbatools_filesize has two rows for each day for each database in it. Recommend you do a dupecheck to see...
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply