Re: String manipulation

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: String manipulation
Дата
Msg-id 3F25A9CC.2050402@joeconway.com
обсуждение исходный текст
Ответ на Re: String manipulation  ("David Olbersen" <DOlbersen@stbernard.com>)
Список pgsql-novice
David Olbersen wrote:
> I have an *UGLY* solution that might give you or others some ideas...
>
> SELECT
>   substring(
>     split_part( path, ':', 2 )
>     from
>     position( ' ' in split_part( path, ':', 2 ) ) + 1
>   )
> FROM paths;
>

That solution was pretty much what I was thinking. An alternative:

SELECT substring(path from position(' ' in path) + 1)
FROM (SELECT split_part( path, ':', 2 ) AS path FROM paths) AS ss;

Joe


В списке pgsql-novice по дате отправления:

Предыдущее
От: Bryan Irvine
Дата:
Сообщение: auto-counting tables
Следующее
От: "David Olbersen"
Дата:
Сообщение: Re: String manipulation