Converts any numeric expression to a decimal value. If scale (number of decimal digits) is omitted, the scale of the result is 0. If precision (total number of digits) is omitted, the precision of the result is determined by the data type of the operand, as follows:
Operand Default
Data Type Precision
tinyint 5
smallint 5
integer 11
bigint 19
float 15
float4 15
decimal 15
money 15
Decimal overflow occurs if the result contains more digits to the left of the decimal point than the specified or default precision and scale can accommodate.
Note: Using DECIMAL on a VARCHAR column requires that the precision and scale be provided.
SELECT DECIMAL('12345678.999',14,2); returns 12345678.99
DOW
DOW(expr)
Operand type: Any absolute date
Result type: CHAR
Converts an absolute date into its day of week (for example, 'Mon,' 'Tue'). The result length is 3.
FLOAT4
FLOAT4(expr)
Operand type: CHAR, VARCHAR, FLOAT, MONEY, DECIMAL, INTEGER1, SMALLINT, INTEGER
Result type: FLOAT4
Converts the specified expression to FLOAT4. Numeric overflow can occur if the argument is too large for the result type (possible from string or decimal).