I am trying to use like operator in the SQL statement of the Database profile but it looks like it doesn't support the like operator. How i can achieve this functionality?
I have a similar question about using the LIKE expression with ? parameter. Instead of using xx LIKE ?, is it possible to use xx LIKE '%?%' in the SQL command?
I believe the % wildcard needs to be part of the value passed in as the parameter, not configured in the profile's statement. In other words, the profile statement would still be ...WHERE field LIKE ?... and you would need to prepend and/or append the % to the parameter value passed in.
Tech note: the database profile statements use PreparedStatements so the ? placeholder for a Character-type field will automatically wrap the value with single quotes: 'theValue'. So you need to append/prepend the % wildcard prior to that.
Retrieving data ...