mutley1
MIS
- Jul 24, 2003
- 909
Hi Experts,
Baffled on this one. I have 2 tables, one contains the size of the database and the datetime stamp the data was taken
(date is a datetime field for sure).
Second table holds individual records of items created and when they were created, e.g.
What I want to try to do is get the sum of how many records were added (T2) between the data collection for T1. Example, if T1 is backup size from msdb.backuphistory and T2 is a working table I have, how can I define how many entries were made between each backup, using the date fields? I am looking at implementing a historical DB at the moment, but need to produce a 1 off and have no history to go on except the msdb and the dates of additions in the user table. Any ideas chaps (and SqlSister!).
cheers,
M.
Baffled on this one. I have 2 tables, one contains the size of the database and the datetime stamp the data was taken
Code:
40GB 2001-12-31
41GB 2002-03-10
45GB 2002-03-19
(date is a datetime field for sure).
Second table holds individual records of items created and when they were created, e.g.
Code:
Item 1 2001-12-31
Item 2 2002-03-11
Item 3 2002-03-17
Item 4 2002-03-18
What I want to try to do is get the sum of how many records were added (T2) between the data collection for T1. Example, if T1 is backup size from msdb.backuphistory and T2 is a working table I have, how can I define how many entries were made between each backup, using the date fields? I am looking at implementing a historical DB at the moment, but need to produce a 1 off and have no history to go on except the msdb and the dates of additions in the user table. Any ideas chaps (and SqlSister!).
cheers,
M.