Search Postgresql Archives

Re: is there a function which elminates spaces?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



SELECT trim(trailing ' ' from city_name) AS city_name FROM sys_cities;

You might consider reading the manual as there are a multitude of string
manipulation functions built into postgreSQL....





"Pierre Couderc" <pierre@xxxxxxxxxxxxxxxx> wrote in message
news:djidc4$2hgk$1@xxxxxxxxxxxxxxxxxxxxx
> 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!
> Maybe there is a solution based on regular epxression, but I do not see
> it.




---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux