chcharindex()函数是什么意思??

chcharindex()函数是什么意思??
charindex(exp1,exp2) 返回第一个字符串位于第二个字符串的起始位
例如:
select charindex("wonderful", notes)
from titles
where title_id = "TC3218"
-----------
46
返回表达式wonderful在titles表中notes列上的起始位置。

select cardflag,state, avg(datediff (s, createtime,finaltime )),min( datediff(s ,createtime, finaltime)),max (datediff( s,createtime ,finaltime))  from do_card with(nolock )  where from_channel_child ='141160'  and isfinal= 1  and createtime between '20141118' and '20141119'  and cardflag in('chinaszx', 'chinaunicom','chinatelecom' )  and datediff(s ,createtime, finaltime)<'3600'  and docount =1  and callerid <>0  group by cardflag, state order by cardflag ,state     
上一篇:ES DSL 基础查询语法学习笔记


下一篇:SQL Server 获取本周,本月,本年等时间内记录