---
schema_version: "1"
id: 8571eb5dc520e1dfc0597c577dfdd2b9c980d72a781925ec8bab1cbdd884023e
title: ends_with({source_str}, {search_str})
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/analytics/bi_dev_guide_sql/guides/bi-sql-string-ends-with.md
canonical_url: https://developer.salesforce.com/docs/analytics/bi-dev-guide-sql/guide/bi-sql-string-ends-with.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 50fec1f587f0e06472540258bcf01710afa1be13f68be969923871ff26a76975
products:
  - SQL for Analytics Developer Guide
  - analytics
---

# ends_with({source_str}, {search_str})

Returns a Boolean indicating whether a string ends with the search string.

`ENDS_WITH()` follows this syntax.

- _source_str_

  - : The string to be searched.

- _search_str_

  - : The string to search for within the source string.

## Example

This example returns a Boolean that confirms whether the value in the `City` field ends with “ale.”

```nolang
SELECT City, ENDS_WITH(City, "ale") as "endValue"
FROM "Superstore"
LIMIT 5;
```

| City            | endValue |
| --------------- | -------- |
| Henderson       | false    |
| Henderson       | false    |
| Los Angeles     | false    |
| Fort Lauderdale | true     |
| Fort Lauderdale | true     |
