错误:函数regexp_like(字符变化,未知)不存在

roy*_*asa 5 sql postgresql

我有这个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但是它们不起作用.可能是什么问题呢?

dwu*_*urf 7

PostgreSQL的当量regexp_like(identifiant,'^73')identifiant ~ '^73'

  • `regexp_matches()`是另一种选择. (2认同)
  • `regexp_matches()` 返回子字符串,而不是布尔值。 (2认同)