Re: How can insert '&' in my string?

From: David Vanidour <dvanidou_at_psc-cfp.gc.ca>
Date: 1998/02/19
Message-ID: <34ECC853.2C41_at_psc-cfp.gc.ca>#1/1


SQL*Plus Users Guide and Referance says the following

Set DEF[INE] {'&'¦c¦OFF¦_ON_)

Sets the character used to prefix substitution variables to c. ON or OFF controls whether SQL*Plus will scan commands for substitution variables and replace them with their values. The setting of DEFINE to ON or OFF overrides the setting of the SCAN variable.

End

News wrote:
>
> Hi, I got a problem, please help me!
> I want to insert a string with '&' into my table, but Oracle always
> recognized the &... as a variable and asked me to input a value... Here's my
> trouble...
> create table test ( name varchar2(32) );
> insert into test values ('Butter&Bread');
> then it asked me to input the Bread variable, :(
> How can I tell Oracle I want & to be & but not a variable prefix? I tried
> '\&' ,'"&' , '&&', but they didn't work and I can't get information from my
> reference book, could someone help me about it? Please! Thanks.
> BTW, how about single quotation mark?
Received on Thu Feb 19 1998 - 00:00:00 CET

Original text of this message