you can easily use osql to execute the file in an ExecuteProcess task.(full
syntax in BOL)
You can pass in the name of the text file to the package on the cmd line by
using the /A switch (full syntax in BOL) to a Global Variable
You can then manipulate the text of the ExecuteProcess task using this
How to manipulate the Execute Process task.
(http://www.sqldts.com/default.aspx?251)
--
Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.allisonmitchell.com - Expert SQL Server Consultancy.
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org
"Stephen Matthews" <smatthews (AT) burbidge (DOT) co.uk> wrote
Quote:
SQL2000
i have a query file called text.sql saved into a directory, this file
is recreated every night with new and updated info by another process.
if i open and run this file in query analyzer it works fine.
so what i now want to do is run the query in a dts package, i want the
package to use the text.sql file for its updating.
i am trying to make the task as automated as possible, at present the
only manual intervention is the opening of the file in query analyzer
and running it.
all ideas welcolm.
thanks |