declare crsr cursor
for SELECT [name] FROM DBO.SYSOBJECTS
WHERE OBJECTPROPERTY(ID,N'IsTable')=1 and type = 'U' and [name] <> 'dtproperties'
for SELECT [name] FROM DBO.SYSOBJECTS
WHERE OBJECTPROPERTY(ID,N'IsTable')=1 and type = 'U' and [name] <> 'dtproperties'
open crsr
declare @tblName sysname
fetch crsr into @tblName
EXEC('truncate table '+@tblName)
while @@fetch_status=0
fetch next from crsr into @tblName
EXEC('truncate table '+@tblName)
close crsr
deallocate crsr