Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Parsing a string search field...
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 - 11:56:51 CDT