I am trying to import information from SQL server to XML as well as trying to create an .xml file in E drive. However the code is shown below is not working:
CREATE PROC x
AS
DECLARE @xmlOutput xml,
@myFile varchar(8000)
SET @xmlOutput= ( SELECT TOP 1000 [tmc_code]
,[measurement_tstamp]
,[speed]
,[average_speed]
,[reference_speed]
,[travel_time_minutes]
,[confidence_score]
,[cvalue]
FROM [INRIX_DATA].[dbo].[Sample]
FOR XML AUTO)
SET @myFile='E:\britain.xml'
EXEC x