EXECUTE xp_cmdshell 'bcp "DECLARE @hdoc2 [int];DECLARE @doc2 [nvarchar](MAX);SET @doc2 = (SELECT LTRIM(RTRIM(REPLACE([xml],''UTF-8'',''UTF-16''))) FROM [database].[xml].[tblXMLIdx]);EXEC sp_xml_preparedocument @hdoc2 OUTPUT, @doc2 ; PRINT @doc2" queryout C:\Users\output\bcp_test_01.txt -c -T -S "computer\instance"'
output ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SQLState = S1000, NativeError = 0 Error = [Microsoft][SQL Native Client]BCP host-files must contain at least one column NULL
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)