September 16, 2008 at 9:48 am
I want to write the contents of a nvarchar(max) variable to a text file through sql server stored procedure. How can i do that...
September 16, 2008 at 1:58 pm
There isn't a good way to do this, but there are ways. You can shell out and use SQLCMD or bcp to pull data out. You can setup an SSIS package and job and then have that send it out, but basically you need an application of some sort to do this. SQL Server doesn't natively talk to the file system.
Could use some VBScript or powershell as well to pull data out.
September 16, 2008 at 2:01 pm
The problem I've run into is that you can't see the entire thing depending on what you use to see the data.
Have you given any thought to using Excel or Word to query the data and then display it however you want in your office app of choice?
-Luke.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply