Message-Id: <10632.118068@fatcity.com> From: "Koivu, Lisa" Date: Wed, 27 Sep 2000 16:28:32 -0400 Subject: RE: quote in string This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C028C1.810F8110 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Thanks for your suggestions.=20 However the root of the problem is the replace(). I can get around it = with what you have suggested though by substr() and concatenating it back together. =20 Thanks again Lisa -----Original Message----- From: elkinsl@flash.net [mailto:elkinsl@flash.net] Sent: Wednesday, September 27, 2000 4:32 PM To: Multiple recipients of list ORACLE-L Subject: Re: quote in string Lisa, Try coding the INSTR as: instr(name,'''') > 0 The first quote denotes the start of the string, the second and third = quotes gives one quote, and the fourth closes the string. Try the following 2 queries=20 to get a feel for it: select 'O''Connor' From Dual; 2 quotes outputting one quote select '''' from dual; Now outputting just a single quote If seeing so many tickies starts to get confusing, you can use the CHR function=20 directly in the INSTR: instr(name,chr(39)) > 0 Or some people like to assign CHR(39) (or '''') to a variable and refer = to the=20 variable throughout their code. Those are just a few of the *many* ways = to=20 handle this. You may prefer other suggestions that are sure to appear. Regards, L. Elkins On Wed Sep 27 14:36:39 2000, "Koivu, Lisa" ,ORACLE- L@fatcity.com wrote: > Hi all -=20 >=20 > I'm putting my developer hat on again. I am writing a procedure that=20 parses > through a string. However, the single quote ( ' ) is becoming a = headache. I > can't replace() it, I can't instr() and look for it. I am beginning = to think > the only way I can get around this when I trip onto it in my code = (and get > it out of my string) is to fall into an exception and check character = by > character and recreate the string in a variable, and handle the = exception > caused by the single quote when it occurs, ignoring the current = character, > and continuing.=20 >=20 > Has anyone got a better idea? =20 > Thanks in advance for any suggestions.=20 >=20 > Lisa Rutland Koivu > Oracle Database Administrator > Qode.com > 4850 North State Road 7 > Suite G104 > Fort Lauderdale, FL 33319 >=20 > V: 954.484.3191, x174 > F: 954.484.2933=20 > C: 954.658.5849 > http://www.qode.com >=20 > "The information contained herein does not express the opinion or = position > of Qode.com and cannot be attributed to or made binding upon = Qode.com." >=20 >=20 > Hi all -=20 >=20 > I'm putting my developer hat on again. I am writing a procedure that=20 parses > through a string. However, the single quote ( ' ) is becoming a = headache. I > can't replace() it, I can't instr() and look for it. I am beginning = to think > the only way I can get around this when I trip onto it in my code = (and get > it out of my string) is to fall into an exception and check character = by > character and recreate the string in a variable, and handle the = exception > caused by the single quote when it occurs, ignoring the current = character, > and continuing.=20 >=20 > Has anyone got a better idea? =20 > Thanks in advance for any suggestions.=20 >=20 > Lisa Rutland Koivu > Oracle Database Administrator > Qode.com > 4850 North State Road 7 > Suite G104 > Fort Lauderdale, FL 33319 >=20 > V: 954.484.3191, x174 > F: 954.484.2933=20 > C: 954.658.5849 > http://www.qode.com >=20 > "The information contained herein does not express the opinion or = position > of Qode.com and cannot be attributed to or made binding upon = Qode.com." >=20 > > > > charset=3Diso-8859-1"> > 5.5.2650.12"> > quote in string > > >=20 >

Hi all - >

>=20 >

I'm putting my developer hat on > again.=A0 I am writing a procedure that parses through a string.=A0 = However, the > single quote ( ' ) is becoming a headache. I can't replace() it, I = can't instr () and look > for it. I am beginning to think the only way I can get around this = when I=20 trip onto it in > my code (and get it out of my string) is to fall into an exception = and check=20 character by > character and recreate the string in a variable, and handle the = exception=20 caused by the > single quote when it occurs, ignoring the current character, and continuing. >

>=20 >

Has anyone got a better idea?=A0 > >
Thanks in advance for any > suggestions. >

>=20 >

Lisa Rutland > Koivu >
Oracle Database > Administrator >
Qode.com >
4850 North State Road 7 >
Suite G104 >
Fort Lauderdale, FL=A0 > 33319 >

>=20 >

V: 954.484.3191, x174 >
F: 954.484.2933 >
C: 954.658.5849 >
HREF=3D"http://www.qode.com" > TARGET=3D"_blank">http://www.qode.com >

>=20 >

FACE=3D"Arial">"The information contained herein does not express the > opinion or position of Qode.com and cannot be attributed to or made binding=20 upon > Qode.com."

>=20 > > --=20 Please see the official ORACLE-L FAQ: http://www.orafaq.com --=20 Author:=20 INET: elkinsl@flash.net Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). ------_=_NextPart_001_01C028C1.810F8110 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable RE: quote in string

Thanks for your suggestions.
However the root of the problem is the replace(). I = can get around it with what you have suggested though by substr() and = concatenating it back together. 

Thanks again
Lisa


-----Original Message-----
From: elkinsl@flash.net [mailto:elkinsl@flash.net]
Sent: Wednesday, September 27, 2000 4:32 PM
To: Multiple recipients of list ORACLE-L
Subject: Re: quote in string


Lisa,

Try coding the INSTR as:

instr(name,'''') > 0

The first quote denotes the start of the string, the = second and third quotes
gives one quote, and the fourth closes the string. = Try the following 2 queries
to get a feel for it:

select 'O''Connor' From Dual; 2 quotes outputting one = quote
select '''' from = dual;        Now outputting just a = single quote

If seeing so many tickies starts to get confusing, = you can use the CHR function
directly in the INSTR:

instr(name,chr(39)) > 0

Or some people like to assign CHR(39) (or '''') to a = variable and refer to the
variable throughout their code. Those are just a few = of the *many* ways to
handle this. You may prefer other suggestions that = are sure to appear.

Regards,

L. Elkins

On Wed Sep 27 14:36:39 2000, "Koivu, Lisa" = <lkoivu@qode.com>,ORACLE-
L@fatcity.com wrote:

> Hi all -
>
> I'm putting my developer hat on = again.        I am writing a = procedure that
parses
> through a string.  However, the single = quote ( ' ) is becoming a headache. I
> can't replace() it, I can't instr() and look = for it. I am beginning to think
> the only way I can get around this when I trip = onto it in my code (and get
> it out of my string) is to fall into an = exception and check character by
> character and recreate the string in a = variable, and handle the exception
> caused by the single quote when it occurs, = ignoring the current character,
> and continuing.
>
> Has anyone got a better idea? 
> Thanks in advance for any suggestions.
>
> Lisa Rutland Koivu
> Oracle Database Administrator
> Qode.com
> 4850 North State Road 7
> Suite G104
> Fort Lauderdale, FL  33319
>
> V: 954.484.3191, x174
> F: 954.484.2933
> C: 954.658.5849
> http://www.qode.com
>
> "The information contained herein does not = express the opinion or position
> of Qode.com and cannot be attributed to or made = binding upon Qode.com."
>
>
> Hi all -
>
> I'm putting my developer hat on = again.        I am writing a = procedure that
parses
> through a string.  However, the single = quote ( ' ) is becoming a headache. I
> can't replace() it, I can't instr() and look = for it. I am beginning to think
> the only way I can get around this when I trip = onto it in my code (and get
> it out of my string) is to fall into an = exception and check character by
> character and recreate the string in a = variable, and handle the exception
> caused by the single quote when it occurs, = ignoring the current character,
> and continuing.
>
> Has anyone got a better idea? 
> Thanks in advance for any suggestions.
>
> Lisa Rutland Koivu
> Oracle Database Administrator
> Qode.com
> 4850 North State Road 7
> Suite G104
> Fort Lauderdale, FL  33319
>
> V: 954.484.3191, x174
> F: 954.484.2933
> C: 954.658.5849
> http://www.qode.com
>
> "The information contained herein does not = express the opinion or position
> of Qode.com and cannot be attributed to or made = binding upon Qode.com."
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML = 3.2//EN">
> <HTML>
> <HEAD>
> <META HTTP-EQUIV=3D"Content-Type" = CONTENT=3D"text/html;
> charset=3Diso-8859-1">
> <META NAME=3D"Generator" = CONTENT=3D"MS Exchange Server version
> 5.5.2650.12">
> <TITLE>quote in = string</TITLE>
> </HEAD>
> <BODY>
>
> <P><FONT SIZE=3D2 = FACE=3D"Arial">Hi all - </FONT>
> </P>
>
> <P><FONT SIZE=3D2 = FACE=3D"Arial">I'm putting my developer hat on
> again.=A0 I am writing a procedure that parses = through a string.=A0 However, the
> single quote ( ' ) is becoming a headache. I = can't replace() it, I can't instr
() and look
> for it. I am beginning to think the only way I = can get around this when I
trip onto it in
> my code (and get it out of my string) is to = fall into an exception and check
character by
> character and recreate the string in a = variable, and handle the exception
caused by the
> single quote when it occurs, ignoring the = current character, and continuing.
> </FONT></P>
>
> <P><FONT SIZE=3D2 = FACE=3D"Arial">Has anyone got a better idea?=A0
> </FONT>
> <BR><FONT SIZE=3D2 = FACE=3D"Arial">Thanks in advance for any
> suggestions. </FONT>
> </P>
>
> <P><B><FONT SIZE=3D1 = FACE=3D"Arial">Lisa Rutland
> Koivu</FONT></B>
> <BR><FONT SIZE=3D1 = FACE=3D"Arial">Oracle Database
> Administrator</FONT>
> <BR><FONT SIZE=3D1 = FACE=3D"Arial">Qode.com</FONT>
> <BR><FONT SIZE=3D1 = FACE=3D"Arial">4850 North State Road 7</FONT>
> <BR><FONT SIZE=3D1 = FACE=3D"Arial">Suite G104</FONT>
> <BR><FONT SIZE=3D1 = FACE=3D"Arial">Fort Lauderdale, FL=A0
> 33319</FONT>
> </P>
>
> <P><FONT SIZE=3D1 = FACE=3D"Arial">V: 954.484.3191, x174</FONT>
> <BR><FONT SIZE=3D1 = FACE=3D"Arial">F: 954.484.2933 </FONT>
> <BR><FONT SIZE=3D1 = FACE=3D"Arial">C: 954.658.5849</FONT>
> <BR><FONT SIZE=3D1 = FACE=3D"Arial"><A
> HREF=3D"http://www.qode.com"
> TARGET=3D"_blank">http://www.qode.com</A></FONT>
> </P>
>
> <P><I><FONT = COLOR=3D"#000000" SIZE=3D1
> FACE=3D"Arial">"The = information contained herein does not express the
> opinion or position of Qode.com and cannot be = attributed to or made binding
upon
> = Qode.com."</FONT></I></P>
>
> </BODY>
> </HTML>

--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
  INET: elkinsl@flash.net

Fat City Network Services    -- (858) = 538-5051  FAX: (858) 538-5051
San Diego, = California        -- Public Internet = access / Mailing Lists
---------------------------------------------------------------= -----
To REMOVE yourself from this mailing list, send an =