现在的位置: 首页 > 综合 > 正文

SQL获取字段html代码中的img标签图片文件的路径

2013年04月21日 ⁄ 综合 ⁄ 共 323字 ⁄ 字号 评论关闭
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

 

抱歉!评论已关闭.