pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedSubstitute
3+ messages / 3 participants
[nested] [flat]
* Substitute
@ 2007-03-20 23:54 Judith <jaltamirano@correolux.com.mx>
2007-03-21 03:02 ` Re: Substitute Milen A. Radev <milen@radev.net>
2007-03-21 03:02 ` Re: Substitute Michael Fuhr <mike@fuhr.org>
0 siblings, 2 replies; 3+ messages in thread
From: Judith @ 2007-03-20 23:54 UTC (permalink / raw)
To: pgsql-sql
Hello everybody....
somebody knows, how I can substitute in a query if a field contains a
character that I want to be shown with other character?
for example if I have a \n I want to shows me a ~ in the result of the
select
thanks in advanced!!
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Substitute
2007-03-20 23:54 Substitute Judith <jaltamirano@correolux.com.mx>
@ 2007-03-21 03:02 ` Milen A. Radev <milen@radev.net>
1 sibling, 0 replies; 3+ messages in thread
From: Milen A. Radev @ 2007-03-21 03:02 UTC (permalink / raw)
To: pgsql-sql
Judith написа:
> Hello everybody....
>
> somebody knows, how I can substitute in a query if a field contains a
> character that I want to be shown with other character?
>
> for example if I have a \n I want to shows me a ~ in the result of the
> select
>
Look for 'replace' here -
http://www.postgresql.org/docs/8.2/static/functions-string.html.
--
Milen A. Radev
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Substitute
2007-03-20 23:54 Substitute Judith <jaltamirano@correolux.com.mx>
@ 2007-03-21 03:02 ` Michael Fuhr <mike@fuhr.org>
1 sibling, 0 replies; 3+ messages in thread
From: Michael Fuhr @ 2007-03-21 03:02 UTC (permalink / raw)
To: Judith <jaltamirano@correolux.com.mx>; +Cc: pgsql-sql
On Tue, Mar 20, 2007 at 05:54:47PM -0600, Judith wrote:
> somebody knows, how I can substitute in a query if a field contains a
> character that I want to be shown with other character?
>
> for example if I have a \n I want to shows me a ~ in the result of the
> select
One way is with translate(). See "String Functions and Operators"
in the documentation for more information.
http://www.postgresql.org/docs/8.2/interactive/functions-string.html
--
Michael Fuhr
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2007-03-21 03:02 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-03-20 23:54 Substitute Judith <jaltamirano@correolux.com.mx>
2007-03-21 03:02 ` Milen A. Radev <milen@radev.net>
2007-03-21 03:02 ` Michael Fuhr <mike@fuhr.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox