ARRAY_POSITION
Applies to: ✅ Data 360 SQL ✅ Tableau Hyper API
Returns the position of the first occurrence of a specified value in an array.
<array>: The array to search.<value>: The value to find (must match the array element type).
Returns an integer that represents the 1-based index of the first occurrence, or NULL if the value isn't found.
- Returns NULL when the value isn't found.
- Position indexing is 1-based.
Find the position of a value in an array.
Returns 2, the index of the first occurrence of 3 in the array.
Attempt to find a value that doesn't exist.
Returns null because 2 isn't present in the array.