SQL获取字段html代码中的img标签图片文件的路径
SELECT SUBSTRING(Description,0,PATINDEX('%"%',Description) as f from( select substring(InfoContent,patindex('%src="%',InfoContent)+5,patindex('%src="%',InfoContent)+5+PATINDEX('%" />%',substring(InfoContent,patindex('%src="%',InfoContent),len(InfoContent)-patindex('%src="%',InfoContent)))) as Description from Tang_Information) as img
作者:mikel
出处:http://www.cnblogs.com/mikel/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
该文章也同时发布在我的独立博客中-www.mikel.cn。