Viewing 2 posts - 1 through 2 (of 2 total)
You will need to use dynamic sql statements to do this.
something like
DECLARE @sql varchar(500)
SET @sql = 'SELECT * FROM ' + @tablename + ' WHERE ID...
February 22, 2006 at 4:26 pm
#622788
I found myself in the same boat.
I used a command like this:
SET @CALL = 'osql -S DATABASE -U USERNAME -P PASSWORD -Q "USE MyDataBase; ALTER TABLE My_Table ADD FLAG CHAR(1) NULL;"'
EXEC('master.dbo.xp_cmdshell '''...
February 22, 2006 at 3:56 pm
#622779