Nota
L-aċċess għal din il-paġna jeħtieġ l-awtorizzazzjoni. Tista’ tipprova tidħol jew tibdel id-direttorji.
L-aċċess għal din il-paġna jeħtieġ l-awtorizzazzjoni. Tista’ tipprova tibdel id-direttorji.
Applies to:
Databricks SQL
Databricks Runtime
Returns the position of a string within a comma-separated list of strings.
Syntax
find_in_set(searchExpr, sourceExpr)
Arguments
searchExpr: A STRING expression specifying the “word” to be searched.sourceExpr: A STRING expression with commas separating “words”.
Returns
An INTEGER.
The resulting position is 1-based and points to the first letter of the match.
If no match is found for searchExpr in sourceExpr or searchExpr contains a comma, 0 is returned.
Examples
> SELECT find_in_set('ab','abc,b,ab,c,def');
3