使用 sqlserver 2005 解析退格分隔文本文件
我需要使用 sqlserver 2005 解析退格分隔的平面文件并更新一些表。最好的方法是什么?
I need to parse a backspace delimited flat file using sqlserver 2005 and update in some tables. What is the best way to go about it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
试过这个吗?
它可能与该定界符一起工作,也可能不工作,也可以尝试 \x08
Tried this?
It may or not work with that delimeter, can also try \x08
Adam Machanic 有一篇关于编写 SQLCLR 字符串解析器的好文章。看看这个:
http://dataeducation.com/faster-more-scalable -sqlclr-字符串分割/
Adam Machanic had a good article on writing SQLCLR string parsers. Check this out:
http://dataeducation.com/faster-more-scalable-sqlclr-string-splitting/
您需要的是 TSQL 中类似 C# Split 的函数。这样的函数不存在。然而,很多人都写过这样的函数。例如:
http://blogs.vbcity.com/hotdog /archive/2008/06/04/9085.aspx
兰迪
What you need is a C# Split like function in TSQL. Such a function doesn't exist. However, many people have written a function like this. For example:
http://blogs.vbcity.com/hotdog/archive/2008/06/04/9085.aspx
Randy