Viewing 3 posts - 1 through 3 (of 3 total)
use pubs
go
select top 10 * from northwind..customers
declare @DB nvarchar(10)
declare @DB1 nvarchar(2000) -- INCREASED SIZE
set @DB = N'northwind'
set @db1 = N'use ' + rtrim(@Db)+'; update customers set ContactName = rtrim(ContactName)+''...
May 5, 2005 at 6:59 am
#557040
Without a [GO] you would need to include any additional commands in @db1 seperated by [;]. It's context did switch but returns to your current db after execution.
May 5, 2005 at 6:24 am
#557025
I have a similar requirement but where SCPTXFR has the option of all objects in 1 file or grouped by file type, I need 1 object per file...
May 5, 2005 at 6:17 am
#557024