Skip site navigation (1) Skip section navigation (2)

string functions

From: "Michael Fuchs" <mf(at)vividscreen(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: string functions
Date: 2002-06-10 19:10:02
Message-ID: 026401c210b2$6cb3c8e0$211a21d5@fubox (view raw or flat)
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


pgsql-novice by date

Next:From: stev knowlesDate: 2002-06-10 19:27:53
Subject: no value in string
Previous:From: Joel BurtonDate: 2002-06-10 15:14:19
Subject: Re: Conditional Join (or something along those lines)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group