Home Forums SQL Server 2008 T-SQL (SS2K8) Table row count grouped by date RE: Table row count grouped by date
J.Faehrmann
SSC Eights!
Points: 957
More actions
December 16, 2013 at 10:16 am
#1673790
sp_msforeachtable example:
sp_msforeachtable 'SELECT ''?'' AS ''table_name'',
CONVERT(VARCHAR, [_when], 112) AS ''_when'',
COUNT(*) AS ''records''
FROM ?
GROUP BY CONVERT(VARCHAR, [_when], 112)'