-
odbc select ..like ?
Hi, , I spent long time but it does not work :
PreparedStatement getSearchStmt;
String getchilds = "select * from MP5_CONCEPT_DEPENDENCIES where PARENT_ID=?";
getSearchStmt.setString(1,"'% + searchstring + %'");
But it does not return nothing, I don't know if what I am doing is correct or not.
Thanks
-
Re: odbc select ..like ?
May be you should write your select statement like:
"SELECT * from EMPLOYEE WHERE FIRST_NAME LIKE 'A%'
This worked under MS SQL, ORACLE and Sybase.
-
Re: odbc select ..like ?
The following should work:
String getchilds = "select * from MP5_CONCEPT_DEPENDENCIES where PARENT_ID LIKE ?";
getSearchStmt.setString(1, "'%" + searchstring + "%'");