我有这个SQL查询,我在postgres写.
select to_char(calldate,'yyyymm') as month,min(calldate) as start_time,max(calldate) as end_time,
'Onnet' as destination,ceil(sum(callduration::integer/60) )as total_minutes,round(sum(alltaxcost::integer) ,2)as revenue
from cdr_data
where callclass ='008' and callsubclass='001'
and callduration::integer >0
and regexp_like(identifiant,'^73')
and bundleunits = 'Money'
and inserviceresultindicator::integer in (0,5)
and regexp_replace(callednumber,'^256','') ~ '^73'
group by to_char(calldate,'yyyymm') ,'Onnet'::text,to_char(calldate,'yyyymm')
Run Code Online (Sandbox Code Playgroud)
它给了我以下错误:
[Err] ERROR: function regexp_like(character varying, unknown) does not exist
LINE 9: and regexp_regexp(identifiant,'^73')
Run Code Online (Sandbox Code Playgroud)
我试过用regexp_matches替换regexp_like但是它们不起作用.可能是什么问题呢?
PostgreSQL的当量regexp_like(identifiant,'^73')是identifiant ~ '^73'
| 归档时间: |
|
| 查看次数: |
8773 次 |
| 最近记录: |