Documentation
Toggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

sql_qlike

sql_qlike returns whether or not the query matches a particular qlike pattern. See the detailed qlike documentation for more about qlike patterns.

Syntax

  SQL_QLIKE(<pattern>)
      
      
  SQL_QLIKE((<pattern>), <parameters>)

Arguments

<pattern>
The qlike pattern to match.
<parameters>
Parameters control the behavior of QLike. (a = must match all of user submission, p = can match partial submission/contains behavior)

Returns

TRUE
If the pattern matches the SQL query.
FALSE
If the pattern doesn’t match the SQL query.
NULL
If the pattern may or may not match the SQL query due to limited SQL comprehension.

Usage Notes

  • The pattern provided is a QLike pattern, not a string.
  • If the parameter variant of SQL_QLIKE is used, the QLike pattern must be wrapped in parentheses.

Examples

SQL_QLIKE(CALL ?)
SQL_QLIKE((CALL ?), 'a')
SQL_QLIKE(SELECT ? FROM ?,?,?)
SQL_QLIKE(SELECT ? FROM SALES.PUBLIC.TRANSACTIONS) AND NOT SQL_QLIKE(SELECT ? FROM SALES.PUBLIC.TRANSACTIONS WHERE ?)