I can write a SELECT statement in Query Analyzer and then click on an icon and have the output go to a file. Is there any way to include in the SELECT statement something to tell SQL Server that I want the output to go to the file?
Sounds like s job for PowerShell, or an SSIS package, or bcp. It's not a feature of native T-SQL. SSMS has the capability to direct output to a file, and even include the query text, but it's not scriptable AFAIK.
-----------
With business clients like mine, you'd be better off herding cats.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.