Where do I place the XML: ON command in the sqlcmd string to get it to work. So far I have been fruitless.
I am trying to export out the single nVarChar(MAX) column from the table listed. It is over 8000 chars long and am told by developers it could generate a file upwards of 50MB.
SO I figured the :XML sqlcmd command may do the trick.
If someone knows of a better way, please drop that to me also.
Here is the code I just attempted:
Thanks
J. Kusch
I am trying to export out the single nVarChar(MAX) column from the table listed. It is over 8000 chars long and am told by developers it could generate a file upwards of 50MB.
SO I figured the :XML sqlcmd command may do the trick.
If someone knows of a better way, please drop that to me also.
Here is the code I just attempted:
Code:
EXEC Master..xp_CmdShell 'sqlcmd -S(local) -E -Q":XML ON SET NOCOUNT ON SELECT * FROM MyDB.dbo.MyTable" -oC:\MyFile.txt -h-1'
Thanks
J. Kusch