Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERROR: function regexp_like(character varying, unknown) does not exist

Tags:

sql

postgresql

I have this SQL query that I'm writing using Postgresql.

select * from cdr_data 
  where REGEXP_LIKE(identifiant,'^73')
    and REGEXP_REPLACE(callednumber,'^256','') ~ '^73'

It gives me following error:

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

I have tried replace with REGEXP_LIKE with LIKE and REGEXP_MATCHES but they don't work.

What could be the problem?

like image 944
roykasa Avatar asked Jan 15 '13 16:01

roykasa


1 Answers

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

like image 147
dwurf Avatar answered Oct 22 '22 08:10

dwurf