Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Escape character for & in strings.
Hi Stevie,
Thanks for your answer. But, what is the char(?) for &.
Here's the hypothetical example:
create table icecream (brand varchar2(100));
insert into icecream VALUES ('Ben & Jerry''s');
what happens is:
Enter value for jerry:
Not what I want to happen. I have code that is trying to do the
insert, so
I run each string through some checker code looking for the apostrophe
and it
alters the string to contain two single quotes, but what about the &
character.
Now, the following insert statement would work: insert into icecream values ('Ben ' || '&' || ' Jerry''s');
I could make my code rewrite the string into that format, but give me
a
break? Isn't there a better solution?
Thanks for your thoughts.
Cindy
Received on Thu Jun 24 1999 - 21:39:17 CDT
![]() |
![]() |