I have the next code:
PreparedStatement stmt = con.prepareStatement(
"select ANUMMER, GESLACHTSNAAM from XAP_SAP_PERSOON where GESLACHTSNAAM = ?");
ResultSet rs = stmt.executeQuery();
This code gives a error:
Exception caught com.sap.sql.log.OpenSQLException: The SQL statement "SELECT "ANUMMER","GESLACHTSNAAM" FROM "XAP_SAP_PERSOON" WHERE "GESLACHTSNAAM" = ?" contains the semantics error[s]: type check error: the expression >>"GESLACHTSNAAM"<< (CLOB) is not comparable and must not be used with "=" at
But when I do the same for the value ANUMMER, which is a long type, and a set the value with setLong function, everything works fine.
So the code is ok, so why is it then not possible to compare a string in the where clause.
Hopefully someone can help!
Thanks in advance!