Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> escaping all 'weird' chars in SQL statements
Hello,
I would think my question is a FAQ, but I can't find answers to it on
deja.com nor on technet.oracle.com.
I'm wondering if there is a way to escape _all_ characters 'weird' SQL
characters, like %, &, _, ', ;, etc. before executing an SQL statement?
This is something I would like to do from my java code, so I'm not
looking for sqlplus solution. I would also love to be able to do
something like this:
sql = "SELECT * FROM my_table WHERE col1='3-4' col2='How?; Here!' ";
sql = sql.escapeAllBadChars(sql);
Is this possible?
Thanks,
Otis
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Mon Mar 27 2000 - 12:21:37 CST