string functions

From: "Michael Fuchs" <liste(at)vividscreen(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: string functions
Date: 2002-06-11 08:55:46
Message-ID: 003d01c21125$c734e5b0$da2821d5@fubox
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

hi there!
i've got some email adresses in my db, but i just want everything before
the '@' to be returned.
example:

firstname(dot)lastname(at)mydomain(dot)tld -> firstname.lastname

what must my select statement look like?

i tried something like
"SELECT TRIM(leading '@' from email) FROM ..." needless to say that this
doesn't work.

thanks in advance!

PS: looking at "user-7.2-A4.pdf" and "user-7.2-US.pdf" in
ftp://ftp.at.postgresql.org/db/www.postgresql.org/pub/doc/current/ i had
to find out that many examples cannot be read because of too narrow
columns. are there other versions of these docs available (html, rtf,
...)?

--michael

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Joshua b. Jore 2002-06-11 09:55:34 Re: string functions
Previous Message Tom Lane 2002-06-10 20:54:27 Re: no value in string