How are you doing this? You look to be using a mixture of TSQL and DTS.
Have a look here for a DTS way to this
How to manipulate the Execute Process task.
(http://www.sqldts.com/default.aspx?251)
--
Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know
"Enric" <Enric (AT) discussions (DOT) microsoft.com> wrote
Quote:
Dear all,
When I am building a sql server task I am not be able to put a global
variable inside a dynamic command.
Look at this:
SET @bcpCommand= 'bcp ' + @db + '' + @table + ' out ' + @strPath +
'.dat -c -S ' + @host + ' -U ' + @strUser +' -P ' + ? + ''
The last one, i.e (?) must be a parameter but returns me an error. And the
before ones are variables declared inside the task.
What's happening?
Regards, |