Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: inserting the value "&"
"Moritz Klein" <mklein_at_students.uni-mainz.de> wrote in message news:<auo4l3$68$1_at_bambi.zdv.Uni-Mainz.DE>...
> Moritz Klein wrote:
> > Hello NG,
> > a problem again but other project.
> > I need to insert a & into a field and got stuck with how to escape
> > this character properly.
> > As to say i am standing on a hose. ;-) (wonder if has same meaning
> > like in Germany).
> >
> > Greetz
> > Moritz
> This is the query:
> INSERT INTO dirs (dirName,ip) values ('/BALD RUNTER/Simon & Garfunkel - The
> Definitive (1994)/','134.93.40.167');
>
> This is what Oracle prints out:
> Enter value for garfunkel: old 1: INSERT INTO dirs (dirName,ip) values
> ('/BALD RUNTER/Simon & Garfunkel - The Definitive (1994)/','134.93.40.167')
> new 1: INSERT INTO dirs (dirName,ip) values ('/BALD RUNTER/Simon
> OEM_sqlplus_input_finished - The Definitive (1994)/','134.93.40.167')
>
> 1 row created.
Try this,
INSERT INTO dirs
(dirName,
ip)
VALUES
('/BALD RUNTER/Simon '|| CHR(38) ||' Garfunkel - The Definitive (1994)/',
'134.93.40.167');
CHR(38) is the ASCII value of &.
Regards
/Rauf Sarwar
Received on Mon Dec 30 2002 - 01:59:39 CST