哪位高手帮忙一下,用存储过程怎么从一个表的一个text 字段里批量导出文件

北极羊 2006-03-21 10:43:53
哪位高手帮忙一下,用存储过程怎么从一个表的一个text 字段里批量导出文件
比如有一个表 table1(id int ,content text,createdate)
将每一条记录中的content字段导出到文件里,文件名以createdate 中的年月日命名,还有oracle数据库的
...全文
103 4 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
junshi_liu 2006-03-23
  • 打赏
  • 举报
回复
用法: bcp {dbtable | query} {in | out | queryout | format} datafile
[-m maxerrors] [-f formatfile] [-e errfile]
[-F firstrow] [-L lastrow] [-b batchsize]
[-n native type] [-c character type] [-w wide character type]
[-N keep non-text native] [-V file format version] [-q quoted identifier]
[-C code page specifier] [-t field terminator] [-r row terminator]
[-i inputfile] [-o outfile] [-a packetsize]
[-S server name] [-U username] [-P password]
[-T trusted connection] [-v version] [-R regional enable]
[-k keep null values] [-E keep identity values]
[-h "load hints"]
北极羊 2006-03-22
  • 打赏
  • 举报
回复
我还是不知道怎么写在cmd怎么生成文件,能说的具体点吗?
北极羊 2006-03-22
  • 打赏
  • 举报
回复
谢谢指教!我试试
huailairen 2006-03-21
  • 打赏
  • 举报
回复
create proc 导出
as
begin
exec('xp_cmdshell bcp命令')
end

22,302

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server 疑难问题
社区管理员
  • 疑难问题社区
  • 尘觉
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧