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

时间:2022-09-13 08:56:54

I have this sql query that i am writing in postgres.

我有一个用postgres编写的sql查询。

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') 

It gives me the following error:

它给了我以下的错误:

[Err] ERROR:  function regexp_like(character varying, unknown) does not exist
LINE 9: and  regexp_regexp(identifiant,'^73')

I have tried replace with regexp_like with like, regexp_matches but they dont work. What could be the problem?

我尝试过用类似regexp_like替换regexp_matches,但它们不能工作。有什么问题呢?

1 个解决方案

#1


5  

The PostgreSQL equivalent of regexp_like(identifiant,'^73') is identifiant ~ '^73'

PostgreSQL的相当于regexp_like(identifiant ^ 73)identifiant ~ ^ 73的

#1


5  

The PostgreSQL equivalent of regexp_like(identifiant,'^73') is identifiant ~ '^73'

PostgreSQL的相当于regexp_like(identifiant ^ 73)identifiant ~ ^ 73的