Ver originalSET @xml = 'bcp "SELECT dbo.traerAutosXML('+ @autos + ')" queryout C:\Autos' + @autos + '.xml -U -P -C -S'+ @@SERVERNAME EXEC xp_cmdshell @xml