Viewing 2 posts - 1 through 3 (of 3 total)
Try this
declare @db sysname
set @db='master'
exec ('use ' + @db)
Go
select * from sysobjects
May 11, 2010 at 6:19 am
#1165486
Use GROUP BY and SUM.
May 11, 2010 at 5:34 am
#1165459