your query is very nice, I use a similar one to bakup all huge table
SELECTgetdate() as tmstmp, o.name as [table_name], MAX(i.rows) AS rows, MAX(crdate) as crdate
FROMtempdb.sys.sysobjects AS o INNER JOIN
tempdb.sys.sysindexes AS i ON o.id = i.id
WHEREo.type = 'u'
andi.rows>1000
GROUP BYo.name
My problem is not due to a wrong use of temptable,
I'm afraid the problem is due to SP and whate they do (Indexes?)
ty again,
Lorenzo