如何将存储过程输出导出到文本文件 [英] How to Export Store Procedure Output to Text file

查看:225
本文介绍了如何将存储过程输出导出到文本文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友们,



我需要你的支持来提出解决方案,



见我有10套不同的商店程序,我必须将其导出到文本文件中,



我的SP将在所有10 sp参数中给出相同的列列不同,



我没有得到解决方案怎么办?



你能帮我理解一下吗?将数据从存储过程输出导出到制表符分隔的文本文件?



如果可能也可以在SSIS包中告诉我。



谢谢

Hi Friends,

I need your support to come up with the solution ,

See i have 10 different set of store Procedure which i have to export into text file,

My SP will give same set of column in all the 10 sp only parameter different,

I am not getting the solution how to do ?

Could you please help me to understand how to export the data from store procedure output to tab delimited text file ?

also if possible can tell me in SSIS package too.

Thanks

推荐答案

从这里开始:批量导入和导出数据(SQL Server) [ ^ ]并阅读所有相关文章。在那里你会找到3种方法将数据导出到分隔的文本文件中。



另一种方法是使用sqlcmd工具:http://blog.sqlauthority.com/2013/03/05/sql-server- exports-query-results-to-csv-using-sqlcmd / [ ^ ]



下次请使用< a href =http://www.codeproject.com/search.aspx?q=export+delimited+tag%3aSQL&doctypeid=1%3b2%3b3%3b13%3b4%3b5> SearchBox [< a href =http://www.codeproject.com/search.aspx?q=export+delimited+tag%3aSQL&doctypeid=1%3b2%3b3%3b13%3b4%3b5\"target =_ blanktitle =新网站> ^ ]位于此网站的右上角。在那里你会找到很多例子。
Start here: Bulk Import and Export of Data (SQL Server)[^] and read all related articles. There you'll find 3 methods to export data into delimited text file.

Another way is to use sqlcmd tool: http://blog.sqlauthority.com/2013/03/05/sql-server-exporting-query-results-to-csv-using-sqlcmd/[^]

Next time, please, use SearchBox[^] at the top-right corner of this site. There you'll find many examples.


这篇关于如何将存储过程输出导出到文本文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆