Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How can I use '&' in VARCHAR2 fields ?
In article <39EF381C.87213AF1_at_raytheon.com>,
Mark Meyer <mmeyer_at_raytheon.com> wrote:
> rdf wrote:
> > I think the subject is all...!!!
> > My example:
> > INSERT INTO mytlb (myfield) VALUES ('/mypage.asp?par1=345&par2=234')
>
> I see nothing wrong with that. Are you getting some kind of error?
>
> --
> Mark Meyer mmeyer_at_raytheon.com
> Raytheon Systems Company Voice (972)575-4595 Fax (972)575-5544
>
Looks can be deceiving. No error is generated, however SQL*Plus is asking for a value for '&par2' upon execution of the insert statement, which is not desired. Try this:
INSERT INTO mytlb (myfield) VALUES ('/mypage.asp?par1=345'||chr(38) ||'par2=234')
You should see the '&' in the data and have no problems with the insert asking about a replaceable parameter.
-- David Fitzjarrell Oracle Certified DBA Sent via Deja.com http://www.deja.com/ Before you buy.Received on Thu Oct 19 2000 - 14:58:13 CDT