Skip to main content
Version: current [25.x]

Categories: String

ENDS_WITH

Returns whether a string ends with another string. The comparison is case-sensitive.

Syntax

ENDS_WITH(expression1 string, expression2 string) → bit

  • expression1: The input expression to search.
  • expression2: The string to search for in the specified expression.

Examples

ENDS_WITH example
SELECT IncidntNum, Category, Descript FROM  "Samples"."samples.dremio.com"."SF_incidents2016.json"
WHERE ENDS_WITH(Category, 'LAWS')
LIMIT 2
-- IncidntNum, Category, Descript
-- 120058272, WEAPON LAWS, POSS OF PROHIBITED WEAPON
-- 120058272, WEAPON LAWS, FIREARM, LOADED, IN VEHICLE