Skip to main content

oct (Function)

This function converts the input parameter p1 to octal.

Syntax

<STRING> math:oct(<INT|LONG> p1)

Query Parameters

NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
p1The value of the parameter whose octal representation should be found.INT LONGNoYes

Example 1

CREATE STREAM InValueStream (inValue long);

@info(name = 'convertToOctal')
INSERT INTO OutMediationStream
SELECT math:oct(inValue) AS octValue
FROM InValueStream;

The query calculates the octal value of the given input inValue from InValueStream, and directs the result to the output stream OutMediationStream. For example, oct(99l) returns "143".