---
schema_version: "1"
id: 0c0650dae0b2bcf1f8735de37ff6eb7faca33090ef2bdc6a1ea6ac75a18a37be
title: SPLIT_PART
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/data-cloud/data-cloud-query-guide/references/data-cloud-sql-reference/scalar-func/string-func/split-part.md
canonical_url: https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/split-part.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: c347b682d4b447955bcc97d01475aad88fce47558eb276527c29a0d3f51e89c3
products:
  - Data 360 Query Guide
  - Data 360 Developer Documentation
---
# `SPLIT_PART`

**Applies to:** ✅ Data 360 SQL ✅ Tableau Hyper API

Splits a string on a delimiter and returns the specified field.

## Syntax

```sql
split_part(<string>, <delimiter>, <field>)
```

## Arguments

### Required

- `<string>`: The string to split.
- `<delimiter>`: The delimiter string.
- `<field>`: The field number to return (1-based). Negative values count from the end.

## Returns

Returns a text value that contains the specified field.

## Considerations

- Field indexing is 1-based.
- Negative field numbers count from the last field backward.
- Returns an empty string if the field number exceeds the available fields.

## Examples

### Extract Field

Get the second field from a delimited string.

```sql
SELECT split_part('abc~@~def~@~ghi', '~@~', 2) AS result;
```

Returns `'def'`.

## Related Documentation

- [String Types](https://developer.salesforce.com/docs/data/data-cloud-query-guide/datatype/string.md)
