postgres - regex_replace in distinct clause?

Posted by n00b0101 on Stack Overflow See other posts from Stack Overflow or by n00b0101
Published on 2010-03-29T02:21:53Z Indexed on 2010/03/29 2:33 UTC
Read the original article Hit count: 331

Filed under:
|
|
|

Ok... changing the question here... I'm getting an error when I try this:

SELECT COUNT ( DISTINCT mid, regexp_replace(na_fname, '\\s*', '', 'g'), regexp_replace(na_lname, '\\s*', '', 'g'))
FROM masterfile;

Is it possible to use regexp in a distinct clause like this?

The error is this:

WARNING:  nonstandard use of \\ in a string literal
LINE 1: ...CT COUNT ( DISTINCT mid, regexp_replace(na_fname, '\\s*', ''...

© Stack Overflow or respective owner

Related posts about postgresql

Related posts about whitespace