易截截图软件、单文件、免安装、纯绿色、仅160KB

求SQL语句 - MS-SQL Server / 基础类

数据库表名student_info 使用查询语句select * from student_info;求SQL语句使得在查询分析器中所得到的数据导出成为一张EXCEL或者是CSV、TXT格式的文件到C:\student 下;
BCP 导入导出功能


EXEC master..xp_cmdshell 'bcp "select * from student_info" queryout C:\student\student_info.txt -c -Sservername -Usa -Ppassword' 


学习了~

晕 看来我得找相干资料学习下才行、、

EXEC master..xp_cmdshell 'bcp "select * from student_info" queryout C:\student\filename.xls -c -Sservername -Usa -Ppassword'


谢小F资料

引用
SQL code
SQL SERVER 和EXCEL的数据导入导出
1、在SQL SERVER里查询Excel数据:
-- ======================================================
SELECT *
from OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
'Data Source="c:\bo……

up.........


相关问答:

jsp链接sql2000的疑问?



type Exception report


message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jas ......

数据以xml格式返回 - MS-SQL Server / 应用实例

从数据库中查询一张表的数据
select 部门,姓名 from tb
如何才能生成下面的xml格式
XML code:
<folder state="unchecked" label="全部">
   <folder state="unchecked&qu ......

求一SQL - MS-SQL Server / 基础类

tab1 字段:billdate,goodsid,incount,inmoney,outcount,outmoney,endprice,endcount,endamt
tab2 字段:goodsid,goodskind(商品类型)
tab3 字段:goodskind(商品类型),kindname
结果:
得到商品类型在一段时间 ......

求一时间比较的SQL 指令 - MS-SQL Server / 基础类

表数据
COL1 COL2 COL2 COL4 COL5
----------------------------------------------------------------------------------------------
2010-05-05 00:00 ......

sql语句问题 - Java / Web 开发

select o_customer,o_price from orders having o_price >=avg(o_price)
select o_customer,o_price from orders where o_price >=(select avg(o_price) from orders)
我感觉没有区别啊,怎么在mysql会有 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号