数学関数 math
パーソナライゼーションエディターで数学関数を使用する方法を説明します。
絶対パス absolute
absolute
関数は、数値をその絶対値を変換するために使用されます。
構文
{%= absolute(int) %}: int
formatNumber format-number
この formatNumber
関数は、任意の数値を言語依存の表現に書式設定するために使用されます。
ロケールを表す数値および文字列を受け入れて、目的のロケールで書式設定された数値の文字列を返します。
構文
{%= formatNumber(number/double,string) %}: string
Oracle ドキュメントとサポートされているロケールにまとめられている書式設定と有効なロケールを使用できます
例
このクエリは、123456.789 に対応するアラビア語で書式設定された文字列を入力番号として返します。
{%= formatNumber(123456.789, "ar_EG") %}
ランダム random
random
関数は、0 ~ 1 の間のランダムな値を返すために使用されます。
構文
{%= random() %}: double
切り捨て round-down
roundDown
関数は、数値を切り捨てるために使用されます。
構文
{%= roundDown(double) %}: double
切り上げ round-up
Count only null
関数は、数値を切り上げるために使用されます。
構文
{%= roundUp(double) %}: double
16 進文字列に to-hex-string
この toHexString
関数は、任意の数を 16 進文字列に変換します。
構文
{%= toHexString(number) %}: string
例
このクエリは、158 の 16 進数値、つまり 9e を返します。
{%= toHexString(158) %}
ToInt to-int
toInt
関数は、これらの型(number、double、int、long、float、short、byte、boolean、string)のいずれかを整数に変換するために使用されます。
構文
{%= toInt(<valueToConvert>) %}: integer
例
このクエリは、42.6 の 整数値、つまり 42 を返します。
{%= toInt(42.6) %}: integer
パーセンテージに to-percentage
toPercentage
関数は数値をパーセンテージに変換するために使用されます。
構文
{%= toPercentage(double) %}: string
精度に to-precision
toPrecision
関数は、数値を必要な精度に変換するために使用されます。
構文
{%= toPrecision(double,int) %}: string
toString to-string
toString 関数は、任意の数値を文字列表現に変換します。
構文
{%= toString(string) %}: string
例
このクエリは「12」を返します。
{%= toString(12) %}
recommendation-more-help
b22c9c5d-9208-48f4-b874-1cefb8df4d76