Re: how to put an special code in a string

From: Jeff Eckermann <jeff_eckermann(at)yahoo(dot)com>
To: jack <datactrl(at)tpg(dot)com(dot)au>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: how to put an special code in a string
Date: 2003-04-23 13:56:45
Message-ID: 20030423135645.97679.qmail@web20808.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

--- Tomasz Myrta <jasiek(at)klaster(dot)net> wrote:
> Uz.ytkownik jack napisa?:
> > Hi all,
> >
> > With pg/Sql, how do I put an special code in a
> string? Such as
> >
> > ''abc'' || <tab>||''xxx''||<cr/lf>
> >
> > How do I specify a tab or cr/lf code? Thank you
> C style should work. Try
> <tab> -> \t
> <cr/lf> -> \r\n ?

A generalized solution is to use the chr() function,
which can represent any ascii character, given the
decimal value as an argument.
So, <tab> is chr(9); <cr/lf> is chr(13) || chr(10)

__________________________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo
http://search.yahoo.com

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Bruce Williams 2003-04-23 15:44:51 Invoice Numbers
Previous Message Rajesh Kumar Mallah 2003-04-23 10:38:37 Oracle 9i under RedHat Linux 8.0 - Simple Installation: Getting started