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 records (with & character)

Re: inserting records (with & character)

From: Wolfgang Breitling <breitliw_at_netcom.ca>
Date: 1997/02/17
Message-ID: <5e8a86$96h@tor-nn1-hb0.netcom.ca>#1/1

In article <5dvgv9$dbt_at_shadow.CSUFresno.EDU>, stevec_at_zimmer.csufresno.edu (Steve Cosner) wrote:
>In article <5dombj$54s_at_nuscc.nus.sg>,
>Motley Crue, Vaxxer <chuacl_at_iscs.nus.sg> wrote:
>>When I tried to insert a record contains a '&' character into a varchar2
>>datatype column, it will prompt me for the value of string that appears after
>>the & char, eg record is "t & t1"
>>
>>After I entered the insert sql statement, I'll get the following
>>Enter value for t1:
>>#after I pressed enter
>>old : insert ....... values("t & t1")
>>new : insert ....... values("t & ")
>
>Try: insert ....... values('t '||chr(38)||' t1')
>
>The chr function can be used to insert any character.
>

or change the & to some other character that doesn't appear in the string to insert. I commonly use the tilde (~):

set define '~'

now you can use the & in strings. Received on Mon Feb 17 1997 - 00:00:00 CST

Original text of this message

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