Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: ENCLOSE QUOTE CHAR. IN SQL ?

Re: ENCLOSE QUOTE CHAR. IN SQL ?

From: Sybrand Bakker <postmaster_at_sybrandb.demon.nl>
Date: Wed, 29 Dec 1999 10:40:31 +0100
Message-ID: <946460505.8769.0.pluto.d4ee154e@news.demon.nl>


select '''' || table.refnbr || '''' from table; You need to escape the quote by using an extra quote. Hence your string is missing a quote.

Hth,

--
Sybrand Bakker, Oracle DBA
Joël Dessart <jocky_at_bigfoot.com> wrote in message news:3869C8D6.27ABBD6E_at_bigfoot.com...
> Hi !
>
> I want to enclose the quote char before and
> after a reference number in a SQL statement.
>
> E.g. : ref. nbr= 0026121.07
> After SQL: '0026121.07'
>
> How could I do this in script since something
> like: select ''' || table.refnbr || ''' from table;
> does not work ?
>
> Is there a mean to say that the quote must be
> kept as character and not as limit of an
> explicit string in this query (kind of ESCAPE char
> for LIKE operator...) ?
>
> Thanks a lot !
>
> Joel
> mailto:jocky_at_bigfoot.com
>
Received on Wed Dec 29 1999 - 03:40:31 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US