Quantcast
Channel: ฟอรัม Getting started with SQL Server
Viewing all articles
Browse latest Browse all 8428

Export to Excel

$
0
0

Hi All

I am trying to export to excell using the below query, I get a query success message but no file is created in the location. I am VERY new to SQL and found this script on google so not really sure what i am doing. any help would be fantastic 

Exec


master..xp_cmdshell'bcp"use Training;

SELECT ID_Number, Employee_Number, Facilitator, Venue, Course_Name, Course_Code,

Date_From, Date_To, Number_of_Days, Received_Date, Verified_Date, Branch, Export_Flag

FROM dbo.TrainingExport

WHERE (Export_Flag IS NULL)

"queryout"C:\Temp\Test.xls"-c-CRAW'


Viewing all articles
Browse latest Browse all 8428

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>