java - How do I place an IN parameter with a LIKE with a RowSet? -


I am now fighting to get IN parameter to work inside a LIEE statement for hours! I am using Cached Rossets, which I think is in compliance with the same rule as it has been prepared.
The default query is:

  cached-rows cassette cache; String sql = "SELECT x" + "From Y" + "Where's Z Like '? __'" cache.setCommand (sql); Cache.setString (1, "some string");  

someString is a known id, but the database (by the way PostgreSQL) has an unknown 2 character in the entry

The parameter placeholder is ignored in the quotes. They are a literal "?" If you use a parameter, you have to place the placeholder outside the quotation marks in the SQL expression.

but any string or any expression that generates a string for example:

  Select x fROM y where like z (?? '__')  

Now you can supply for the "someString" parameter, and then continuously string it '__ '.


Comments