I have:

statement = "SELECT * FROM JOB_STATUS WHERE (ASSIGNED_TO = ? OR
ASSIGNED_TO LIKE ? OR ASSIGNED_TO LIKE ?)
....
pstmt.setString(2, technician.toLowerCase() + "%");
...
if value of technician = "abc\mike"

I get this error:

org.h2.jdbc.JdbcSQLException: Error in LIKE ESCAPE: abc\[*]mike%; SQL
statement:
SELECT * FROM JOB_STATUS WHERE (ASSIGNED_TO = ? OR ASSIGNED_TO LIKE ?
OR ASSIGNED_TO LIKE ?)

The same works in HSQL, Oracle, MySQL, and MSSQL.

Thanks
Roshan

--

You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.


Reply via email to