...
Warning | ||
---|---|---|
Dynamic fields can not be used between single or double quotes. For instance, a query with a dynamic field in the LIKE clause:
does not work. The solution is to use string concatenation provided by the database, so that {key} to be outside of ' or ". For instance for PostgreSQL, Oracle, HSQLDB: SELECT col1 , col2, col3 FROM table WHERE col1 LIKE '%' || {key} || '%' For MySQL: SELECT col1 , col2, col3 FROM table WHERE col1 LIKE concat('%', {key}, '%') For MS Sql Server: SELECT col1 FROM table WHERE col1 LIKE '%' + {key} + '%' For other databases, please see what is the operator for string concatenation. |