Hi Andrew....
You can use a couple different command line versions of sql server programs
to give you what you are looking for.
One example is BCP (also try OSQL):
For complete syntax, on command line, type bcp /?
For example:
bcp -Sservername -Uusername -Ppassword -imyinputfile -omyoutputfile
where myinputfile is the name of a file that contains the sql that you want
to run and
myoutputfile is the name of a file where you want the output directed
BCP and OSQL are executables that come with SQL Server. Go out to a command
prompt and run them from there.
They are typically found in the c:\program files\microsoft sql
server\80\tools\binn directory.
Hope this helps.
Sandeep
******************************************************
Sandeep Kataria
University of Minnesota Cancer Center,
Suite 310 Dinnaken Office Building,
925 Delaware St. SE
Telephone: (612) 624-3994 | Fax: (612) 624 1057
Email: [Email Address Removed]
******************************************************
PRIVACY & CONFIDENTIALITY NOTICE: This e-mail message, including any
attachments, is for the sole use of the intended recipient(s) and may
contain business confidential and privileged information. Any unauthorized
review, use, disclosure or distribution is prohibited. If this e-mail was
not intended for you, please notify the sender by reply e-mail that you
received this in error. Destroy all copies of the original message and
attachments.
MS Sql Server LazyDBA home page