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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Inserting a & into a table

Re: Inserting a & into a table

From: Chris Hamilton <toneczar_at_erols.com>
Date: 1998/04/02
Message-ID: <01bd5e40$be907ce0$73344b9b@chrish.hq.usace.army.mil>#1/1

Shawn A. Savela <ssavela_at_winternet.com> wrote ...  

> There has *got* to be an easy solution to this:
>
> How do I insert a row into a table that has an embedded '&'
> character in it via sqlplus?
>
> I tried :
>
> insert into mytable (field1) values ('Rock & Hard Place');
>
> and it asks me to define 'Hard'. Any combination of &&
> or &&& or /&, etc fails (obviously, I can't find any
> documentation on this). Do I need to do a CHR(?) or
> something to that effect, or is there an escape character
> I can use?

Using a CHR() function would be your best bet. Offhand I don't know the numeric code for &, but it should be easy enough to find.

Chris



Chris Hamilton -- toneczar_at_erols.com
City of Washington Pipe Band
http://www.serve.com/cowpb/chamilton.html Received on Thu Apr 02 1998 - 00:00:00 CST

Original text of this message

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