Get Row Count of a Table on a previous date

Database
N/A

Get Row Count of a Table on a previous date

Hi All,

We keep 3 months of historic data. Is it possible to get the row count of a table on any previous date?

The date might be 1,2 or 3 months old.

I can get the size of the table but is there any method to get row count?

4 REPLIES

Re: Get Row Count of a Table on a previous date

I don't think that is possible unless you have some metadata capturing process defined capturing table details before and after execution of the loading jobs...

Re: Get Row Count of a Table on a previous date

Hi,

You can get the row count only when you have an Timsewtamp column,which will be updated when you insert or update the record in the table. So that we can get the row count using the Timestamp variable from the Table.

N/A

Re: Get Row Count of a Table on a previous date

Thanks for the replies folks.

We have a housekeeping job that keeps a record of all the sizes of tables as well as databases, but only 90 days old.

Re: Get Row Count of a Table on a previous date

You can calculate the size of row using the data types used in table definition and probably can do some maths to calculate the number of rows using currentperm consumed against the rowsize. You can probably get close to the number of rows but I am not sure how accurate those results would be.....