SQL Server URL 解码
我需要对存储 URL 编码文本的旧表运行查询。我需要在结果中解码此文本。我该如何实现这一目标?
I need to run a query against a legacy table that stores URL encoded text. I need this text to be decoded in my results. How do I achieve this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
尝试其中之一:
来自 http://sqlblog .com/blogs/peter_debetta/archive/2007/03/09/t-sql-urldecode.aspx
来自 http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=88926
Try one of these:
from http://sqlblog.com/blogs/peter_debetta/archive/2007/03/09/t-sql-urldecode.aspx
from http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=88926
如果您需要支持非英语字符(unicode)的解决方案,代码项目:
If you need a solution that support non english characters (unicode), there's an excelent example on CodeProject:
我会添加一些额外的解码。我遇到的一个错误是返回值为空。我还注意到上面的一些答案用空格替换了“+”。
I would add some additional decoding. One error I came across is the return value was null. I also noticed that a few of the answers above replaced the '+' with a space.