Skip to main content

Useful SQL functions

Custom SQL Fields enable you to create a new field, which is the result of concatenating two or more existing fields, or is the result of a mathematical calculation on numeric fields. This field type

Updated over 2 weeks ago

Custom SQL Fields enable you to create a new field, which is the result of concatenating two or more existing fields, or is the result of a mathematical calculation on numeric fields. This field type allows the user to utilize SQL commands like ones below:

Date Functions

adds a time/date interval to a date and then returns the date

returns a specified part of a date where the returned result is a string value

returns a specified part of a date where the returned result is an integer value

returns the difference between two date

returns the day of the month for a specified date

returns the current type timestamp

returns the month for a specified date

returns the year for a specified date

String Functions

searches for a substring in a string and returns the position

formats a number value. For general data type conversions, use CAST() or CONVERT()

extracts a number of characters from a string (starting from left or right)

returns the length of a string

converts a string to lower-case or upper-case

replaces all occurrences of a substring within a string with a new substring

extracts some characters from a string

Numeric Functions

returns the absolute (positive) value of the specified numeric expression

rounds a number to a specified number of decimal places

Advanced Functions and Case Statements

converts a value (of any type) into a specified datatype

returns the first non-null value in a list

converts a value (of any type) into a specified datatype

goes through conditions and returns a value when the first condition is met (like an IF-THEN-ELSE statement)

takes all expressions from rows and concatenates them into a single string.

Did this answer your question?