SQL

来源:互联网 发布:网络协议分析参考书 编辑:程序博客网 时间:2024/06/06 03:45

substring(expression,start,length)
其中expression是字符串。start是开始街区字符串的地方,length为街区字符串的长度。start and length 都是int型
patindex(‘%pattern%’,expression)
返回pattern在expression中首次出现的位置的值。返回值是int型

select distinct t2.vcsubserv, substring(VCHTMLKeywords,10,
patindex(‘%.pcap;%’,VCHTMLKeywords)-1)as VCHTMLKeywords

,vchostip, vcurl
,vcuseragent,t1.intsubservid
FROM ftbAppSession999_20170601 t1,epmp_tbService_bak0401 t2
where VCHTMLKeywords
like ‘%temp_huang_weinidushi_0601%’ and

t1.intsubservid=t2.intsubservid;

原创粉丝点击