将数据从SqlQuery导出到Excel工作表

时间:2013-06-27 07:32:17

标签: excel sql-server-2008 export

我有以下的查询,想知道如何从Sql server将结果导入excel表

这是我要导入的内容

select c.description as 'provider',
b.lastname, b.firstname, b.middleinitial, 
convert(varchar(10),b.dob,101) as DOB, b.chartID,
b.sex, d.businessname, d.businessfax
from patientappointmentbase as a, patientlistbase as b, 
resourcebase as c, locationbase as d
where convert(varchar(10),a.starttime,101) = '06/26/2013'
and a.patientid = b.patientid
and a.resourceid = c.resourceid
and a.locationid = d.locationid
order by provider, lastname, firstname

0 个答案:

没有答案