Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Parsing a string search field...

Re: Parsing a string search field...

From: Chris Colclough <chris.colclough_at_jhuapl.edu.nospam>
Date: Wed, 28 Jul 1999 15:58:48 -0400
Message-ID: <379F60F7.7A3C9607@jhuapl.edu.nospam>


try

select (where_condition,'''','''''') from dual.

This should replace all single quotes with double quotes.

hth

lcardascia_at_my-Deja.com wrote:

> Hi All,
>
> I have to modify a C++ programm in Unix enviroment that works over oracle database server.
>
> For a query to send to DataBase as
>
> i.e.
> select * from <name table> where <where condition string>
>
> my class methode receives "where condition string" as arguments and composes query to send to DataBase.
> If <where condition string> contains a string search field with an apostrophe within it my query fails. Then I have to duplicate each apostrophe within
> search string (if it is present) so that the queryworks well.
>
> The problem is that <where condition string> is generic and it can contain a subquery too.
> I think it's very expensive to develope a routine
> to do a complete parsing of <where condition string> to search the presence of an apostrophe within each string search.
>
> How can I split a generic <where condition string> to find all search strings ?
> Is there a way of parsing the <where condition string> by using some Oracle function ?
>
> Can Anyone suggest me what I can do to solve the problem ?
>
> Thankful for replies.
> Regards,
> Lorenzo Cardascia
>
> --== Sent via Deja.com http://www.deja.com/ ==--
> Share what you know. Learn what you don't.
Received on Wed Jul 28 1999 - 14:58:48 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US