Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Managing escape characters in SQL and Java

843854Sep 16 2002 — edited Nov 12 2002
Hello All,
How can I manage special characters(ESPECIALLY single quotes) in my select statements?? If I have to query the database for the rows with name O'brain for example, I am writing a query
String SQL = "SELECT Name FROM MyTable where Name like 'O/'brain%' {escape '/'}";
But this is not working for me. I am using Sybase database. Can anyone help me out with this ?? I don't want to use prepared statements.

Thanks & Regards,
Sarada.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 10 2002
Added on Sep 16 2002
4 comments
186 views