# `STRPOS`

**Applies to:** ✅ Data 360 SQL ✅ Tableau Hyper API

Returns the location of a substring within a string.

## Syntax

```sql
strpos(<string>, <substring>)
```

## Arguments

### Required

- `<string>`: The string to search.
- `<substring>`: The substring to find.

## Returns

Returns an integer representing the 1-based position, or `0` if not found.

## Considerations

- Same as `position(substring in string)` but with reversed argument order.

## Examples

### Find Substring

Locate a substring within a string.

```sql
SELECT strpos('high', 'ig') AS result;
```

Returns `2`.

## Related Documentation

- [String Types](/docs/data/data-cloud-query-guide/references/dc-sql-reference/string.md)
