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.
| Author |
Topic |
|
PaulHamill
Starting Member
1 Post |
Posted - 2003-04-24 : 08:07:14
|
| AllI have written a Stored Procedure to Run on a daily basis to record the number of records in each of the tables within my database. The ouput of this script is to a table and is as follows...Date TableName NoOfRecords23-04-2003 TableA 1023-04-2003 TableB 5024-04-2003 TableA 1524-04-2003 TableB 60I want to be able to work out the daily increase in records of each of the tables. Does anyone have any ideas,Thanking you all in advance |
|
|
Page47
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2003-04-24 : 08:32:14
|
| [url="http://www.sqlteam.com/item.asp?ItemID=3856"] Calculating Running Totals [/url]Jay White{0} |
 |
|
|
ValterBorges
Master Smack Fu Yak Hacker
1429 Posts |
Posted - 2003-04-24 : 08:32:49
|
| http://www.sqlteam.com/item.asp?ItemID=3856 |
 |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2003-04-24 : 08:36:57
|
| select t1.TableName, t1.Date, t1.NoOfRecords - t2.NoOfRecordsfrom tbl.t1, tbl.t2where t1.TableName = t2.TableName and t2.Date = (select min(t3.Date) from tbl t3 where t1.TableName = t3.TableName and t3.Date > t1.Date)order by t1.TableName, t1.Datealso seewww.nigelrivett.comGet number of rows in tables==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
|
|
|