Re: String manipulation - Mailing list pgsql-novice

From David Olbersen
Subject Re: String manipulation
Date
Msg-id E7E213858379814A9AE48CA6754F5ECB0D7021@mail01.stbernard.com
Whole thread Raw
In response to String manipulation  ("Chad Thompson" <chad@weblinkservices.com>)
Responses Re: String manipulation  (Joe Conway <mail@joeconway.com>)
List pgsql-novice
Chad,

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;

--------------------------
David Olbersen
iGuard Engineer
St. Bernard Software
11415 West Bernardo Court
San Diego, CA 92127
1-858-676-2277 x2152


> -----Original Message-----
> From: Chad Thompson [mailto:chad@weblinkservices.com]
> Sent: Monday, July 28, 2003 1:56 PM
> To: pgsql-novice
> Subject: [NOVICE] String manipulation
>
>
> I cannot seem to put this together properly.
>
> I have a column path that has string data I want parsed out.
>
> select path from paths
>
> path
> -------------------------------------
> Canon:Canon Toner
> Data Products:Data Products Toner
> Epson:Epson Inkjet Cartridges
> Tektronix by Xerox:Tektronix Ink Sticks
>
>
> what i would like is something like this
>
> Toner
> Products Toner
> Inkjet Cartridges
> Ink Sticks
>
> That is.... after the colon, find the first space and give
> the rest of the
> string.
>
> TIA for any ideas
> Chad
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to
> majordomo@postgresql.org
>

pgsql-novice by date:

Previous
From: "Chad Thompson"
Date:
Subject: String manipulation
Next
From: Bryan Irvine
Date:
Subject: auto-counting tables