Re: Q: how to insert text which includes a & (ampersand) using sqlplus

From: Naren Chintala <naren_at_mink.att.com>
Date: 1996/07/09
Message-ID: <4rtvu1$8o7_at_nntpa.cb.lucent.com>#1/1


Doron Sherman <dorons_at_w3spider.com> wrote:
>I hope someone knows the answer to this question:
>
>In sqlplus, using an INSERT statement like the following -
>
>INSERT INTO table1 VALUES ('A & B')
>
>causes a prompt to appear as a response for asking a value
>for B, rather than inserting the string 'A & B' into the database.
>
>My question is, how is a & (ampersand) inserted using an INSERT
>statement. Is there a special escaping needed for that ?
>
>Thanks in advance,
>
>Doron\
>
>Please respond by email to: dorons_at_w3spider.com

This shoul work.

SQL> set escape \
SQL> INSERT INTO table1 VALUES ('A \& B');

naren chintala
naren_at_mink.att.com Received on Tue Jul 09 1996 - 00:00:00 CEST

Original text of this message