---
cuppy_hub: salesforce
cuppy_path: reference/official/data360/data-cloud-query-guide/references/dc-sql-reference/scalar-functions.md
cuppy_section: docs
cuppy_doc: P8S4-XKHB
cuppy_doc_uuid: aafb2de8-df71-4663-908b-ffedbf212ce2
cuppy_permalink: https://cuppy.io/salesforce/d/P8S4-XKHB
cuppy_version: 1
cuppy_updated: 2026-10-23T16:16:52.575Z
cuppy_canonical: https://cuppy.io/salesforce/docs/reference/official/data360/data-cloud-query-guide/references/dc-sql-reference/scalar-functions
cuppy_mcp: https://cuppy.io/mcp
cuppy_body_sha256: 078a8a6516dac4c07d4c3c784917adc037d6b613a649dcbb9db47d8bf09c1215
# cuppy_body_sha256 is over the document body ALONE, excluding both generated blocks.
---

> Mirror of <https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/scalar-functions.html> (Salesforce, Data 360 Query Guide), read 2026-10-23. Salesforce's own page is the authority; this copy exists because that site refuses non-browser readers.

## Scalar Functions and Operators

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

Functions and operators compute one result for each set of input values. Use scalar functions and operators to transform values, compare data, perform calculations, and control how expressions are evaluated.

Use generative AI models to classify text, analyze sentiment, and generate text.

*   [AI Functions](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/ai-funcs.html) - Classify text, determine sentiment, or generate text from a prompt.

Create, inspect, and transform arrays and JSON values.

*   [Array Functions](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/arrays.html) - Access, search, build, transform, and compare arrays and vectors.
*   [JSON Functions](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/json-funcs.html) - Construct JSON values from SQL values, arrays, and key-value pairs.

Format, transform, search, and compare text values.

*   [String Functions and Operators](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/string-func.html) - Concatenate, measure, extract, trim, encode, hash, and transform strings.
*   [String Pattern Matching](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/string-matching.html) - Match strings with `LIKE`, regular expressions, and related functions.

Convert values between data types or format values for display.

*   [Data Type Formatting Functions](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/formatting-func.html) - Convert numbers, dates, timestamps, and other values to or from formatted strings.
*   [Type Conversions](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/type-conversion.html) - Convert an expression from one data type to another.

Compare values and combine or negate conditions.

*   [Comparison Operators and Predicates](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/comparison-func.html) - Compare values for equality, ordering, ranges, nullness, and distinctness.
*   [Subquery Comparisons](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/subquery-comparison.html) - Compare scalar values with rows returned by a subquery.
*   [Logical Operators](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/logical.html) - Combine or negate Boolean expressions with `AND`, `OR`, and `NOT`.

Choose a result based on conditions or available values.

*   [Conditional Expressions](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/conditional-func.html) - Select among values with `CASE`, `COALESCE`, `NULLIF`, `GREATEST`, and `LEAST`.

Perform numeric calculations.

*   [Mathematical Functions and Operators](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/math-func.html) - Perform arithmetic, rounding, logarithmic, trigonometric, bitwise, and other numeric operations.

Create, inspect, compare, and modify temporal values.

*   [Date/Time Functions and Operators](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/datetime-func.html) - Calculate with dates, times, timestamps, and intervals; extract fields; and truncate temporal values.


---
<!-- cuppy -->
You are reading one file. The same content is free over MCP at https://cuppy.io/mcp with no signup: ranked search across all 376 documents in this hub, the merged view when you work in a layer, known workarounds matched to the error you hit, and depth control so you spend tokens on what you need. Start with the `_hello` tool. How to connect: https://cuppy.io/salesforce/ Something wrong in this document? Report it with the `session feedback` tool on the same endpoint.
<!-- /cuppy -->
