Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

HELP - How can Oracle accept the '&' character in a string???

0 views
Skip to first unread message

Jenny O'Brien

unread,
Sep 29, 2000, 3:00:00 AM9/29/00
to
Hi,

I'm trying to populate an Oracle database with a string containing and
ampersant ('&' character). Do you have any ideas?? I've tried enclosing it
in double and singe quotes and I've tried '&&' but no luck !

Any help would be greatly appreciated.

Thanks,
Jenny

NetComrade

unread,
Sep 29, 2000, 3:00:00 AM9/29/00
to
in sqlplus:
set escape="\"
insert values('United \& States') into countries

Roman Starek

unread,
Sep 29, 2000, 3:00:00 AM9/29/00
to

: I'm trying to populate an Oracle database with a string containing and

: ampersant ('&' character). Do you have any ideas?? I've tried enclosing it
: in double and singe quotes and I've tried '&&' but no luck !


If you are talking about SQLPlus try this setting

set scan off


Starous


Holden

unread,
Sep 29, 2000, 3:00:00 AM9/29/00
to
hmm....

how are you trying to do it?

you could try this:

SQL> set escape \
SQL> insert into foo values
2 ('test\&test');

1 row created.

SQL> select * from foo;

FOOTEST
--------------------
test&test

HTH
-Holden


On Fri, 29 Sep 2000 15:45:32 +0100, "Jenny O'Brien"
<jen...@peregrine.ie> wrote:

>Hi,
>


>I'm trying to populate an Oracle database with a string containing and
>ampersant ('&' character). Do you have any ideas?? I've tried enclosing it
>in double and singe quotes and I've tried '&&' but no luck !
>

frank

unread,
Sep 29, 2000, 3:00:00 AM9/29/00
to
And now for the short and easy way:
set define off.

SQL> create table foo (b varchar2(40));
Table created.

SQL> set define off
SQL> insert into foo values('Gall&Gall');
1 row created.

SQL> select * from foo;

B
----------------------------------------
Gall&Gall

Grtz, Frank

0 new messages