"Pierre Couderc" <pierre (AT) couderc (DOT) ccNOSPAM> schreef in bericht
news:djidc4$2hgk$1 (AT) biggoron (DOT) nerim.net...
Quote:
In a WHERE clause, I want to to compare strings ignoring the spaces
inside them. Is therd a function to do that? I do not find it in the
documentation.
SELECT ... WHERE (ignore_spaces(table.phone_number) ~* igore_spaces(?));
would be fine but ignore_space() does not exist!
Try translating [only] space(s) to .. nothing:
|
SELECT ... WHERE translate(table.phone_number,' ','') = translate(?,' ','');
be aware this will never use an index!
HansH