Skip to main content
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

ArgumentDescription
fieldThe text to search.
valueThe 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 orders
WHERE
KATER__TEXT_CONTAINS(orders.notes, 'GIFT')
GROUP BY
orders.notes
ORDER BY
1
NotesOrders
gift wrap please575

Compiles to

The call compiles to the same SQL on DuckDB and on Snowflake.

CONTAINS(LOWER(orders.notes), LOWER('GIFT'))

See also