求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资料
up.........
相关问答:
sql的软件在哪里可以下啊!在网上找了蛮多都用不了啊
随便搞一D版吧,
迅雷第一个就可以用
2000,2005都这样
http://119.147.41.16/down?cid=0698C2D64D7D637D90A6D2482298E6717D4F15CD&t=2&fmt=-1 ......
tab1 字段:billdate,goodsid,incount,inmoney,outcount,outmoney,endprice,endcount,endamt
tab2 字段:goodsid,goodskind(商品类型)
tab3 字段:goodskind(商品类型),kindname
结果:
得到商品类型在一段时间 ......
字段1,字段2.....字段N,Status,ParentID
1,Name1....test1,1,99
1,Name1....test1,3,99
1,Name2....test2,1,101
1,Name2....test2,3,101
1,Name3....test3,2,101
1,Name1....test1,4,101
想要的结果是:
1,Na ......
有这样一条SQL
Select Get_Costtaxrate(col1), Get_Tcostvalue(col1) from a
其中Get_Costtaxrate、Get_Tcostvalue都是函数,这两个函数里面都是查找一个大表,Get_Tcostvalue还需要调用Get_C ......
表数据
COL1 COL2 COL2 COL4 COL5
----------------------------------------------------------------------------------------------
2010-05-05 00:00 ......