Hi All,

Is there a way to execute a regex, inside a SELECT
statement, to substitute things?

For example:

SELECT name FROM mytable;
 name
---------
 john
 michael
 robert
 richard
 chandler

I want to substitute all "r" to "-"

SELECT myfunction(name) FROM mytable;
 name
---------
 john
 michael
 -obert
 -icha-d
 chandle-

Any idea??

Thanks in advance,
Regards,

Marcelo P.
Brazil


                
_______________________________________________________
Yahoo! Acesso Grátis - Internet rápida e grátis. Instale o discador agora!
http://br.acesso.yahoo.com

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to