Scalar Functions and Operators
Data 360 Query Guide, mirrored from developer.salesforce.com: **Applies to:** ✅ Data 360 SQL ✅ Tableau Hyper API
markdownreferencev1P8S4-XKHBguide: data-cloud-query-guidestage: referencetrust: officialsource: developer.salesforce.comservice: data360interface: sqlScalar Functions and OperatorsData 360Data CloudData 360 Query Guide
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 - Classify text, determine sentiment, or generate text from a prompt.
Create, inspect, and transform arrays and JSON values.
- Array Functions - Access, search, build, transform, and compare arrays and vectors.
- JSON Functions - Construct JSON values from SQL values, arrays, and key-value pairs.
Format, transform, search, and compare text values.
- String Functions and Operators - Concatenate, measure, extract, trim, encode, hash, and transform strings.
- String Pattern Matching - Match strings with
LIKE, regular expressions, and related functions.
Convert values between data types or format values for display.
- Data Type Formatting Functions - Convert numbers, dates, timestamps, and other values to or from formatted strings.
- Type Conversions - Convert an expression from one data type to another.
Compare values and combine or negate conditions.
- Comparison Operators and Predicates - Compare values for equality, ordering, ranges, nullness, and distinctness.
- Subquery Comparisons - Compare scalar values with rows returned by a subquery.
- Logical Operators - Combine or negate Boolean expressions with
AND,OR, andNOT.
Choose a result based on conditions or available values.
- Conditional Expressions - Select among values with
CASE,COALESCE,NULLIF,GREATEST, andLEAST.
Perform numeric calculations.
- Mathematical Functions and Operators - Perform arithmetic, rounding, logarithmic, trigonometric, bitwise, and other numeric operations.
Create, inspect, compare, and modify temporal values.
- Date/Time Functions and Operators - Calculate with dates, times, timestamps, and intervals; extract fields; and truncate temporal values.