ARRAY_REMOVE_AT

Applies to: ✅ Data 360 SQL ✅ Tableau Hyper API

Returns an array with the element at a specified position removed.

Syntax

array_remove_at(<array>, <position>)

Arguments

Required

  • <array>: The source array.
  • <position>: The 1-based index of the element to remove.

Returns

Returns an array with the element at the specified position removed.

Considerations

  • Validate positions before use to avoid unexpected behavior with out-of-bounds values. If you provide a position out-of-bounds no array elements are removed.

Examples

Remove at Position

Remove the element at index 2.

SELECT array_remove_at(array[1, 3, 5, 3], 2) AS result;

Returns array[1, 5, 3], removing the element at position 2.

Related Documentation