On this page
Kater SQL Functions Conditions
KATER__TEXT_CONTAINS
True where the text contains the value, in any letter case.
Family: Conditions
Syntax
KATER__TEXT_CONTAINS(field, value)Arguments
| Argument | Description |
|---|---|
field | The text to search. |
value | The text to look for. Value, or a parameter a reader supplies. |
Returns
TRUE or FALSE. It is NULL where the field is empty, so a filter leaves that row out.
Usage notes
- The value is plain text:
%and_match only themselves.
Example
This Sandbox query reads the sample shop’s orders. The table shows the rows that Kater gave.
SELECT orders.notes AS "Notes", EVAL(orders.count_distinct__order_id) AS "Orders"FROM kater_dataset.orders AS ordersWHERE KATER__TEXT_CONTAINS(orders.notes, 'GIFT')GROUP BY orders.notesORDER BY 1| Notes | Orders |
|---|---|
| gift wrap please | 575 |
Compiles to
The call compiles to the same SQL on DuckDB and on Snowflake.
CONTAINS(LOWER(orders.notes), LOWER('GIFT'))See also
- Filters and parameters
- Other functions in Conditions:
KATER__IS_EQUAL_TO,KATER__IS_NOT_EQUAL_TO,KATER__IS_GREATER_THAN,KATER__IS_AT_LEAST,KATER__IS_LESS_THAN,KATER__IS_AT_MOST,KATER__IS_BETWEEN,KATER__IS_ONE_OF,KATER__IS_NOT_ONE_OF,KATER__TEXT_DOES_NOT_CONTAIN,KATER__IS_NULL,KATER__IS_NOT_NULL