SQL Server文件操作? [英] SQL Server File Operations?
本文介绍了SQL Server文件操作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用SQL Server 2005:如何使用T-SQL将文件读入SPROC?因此,假设我有一个CSV文件,如下所示:
p> ID,OtherUselessData
1,asdf
2,asdf
3,asdf
etc ...
我基本上想这样做:
pre $ select * from mytable where id in(从txtFile选择id)
解决方案
Using SQL Server 2005: How can I read a file into a SPROC using T-SQL?
So, imagine I have a CSV file like so:
ID,OtherUselessData
1,asdf
2,asdf
3,asdf
etc...
I basically want to do this:
Select * from mytable where id in (select id from txtFile)
解决方案
here are some examples: http://www.simple-talk.com/sql/t-sql-programming/reading-and-writing-files-in-sql-server-using-t-sql/
这篇关于SQL Server文件操作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文