– Create one Excel File in c:\Test.xls and rename the Sheet1 to Emp. The Sheet should contain 2 columns EmployeeID,Title
USE [Production]
INSERT INTOOPENROWSET(‘Microsoft.Jet.OLEDB.4.0′,‘Excel8.0;Database=c:\Test.xls;’,‘Select * from [Emp$]’)
Select EmployeeID, Title FROM Employment.Employee
SQL Query to export data from sql server to excel
Labels:
SQL Server
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment