DECFLOAT


The DECFLOAT function returns a DECFLOAT representation of a number using the precision specified in the second argument.

DECFLOAT.png


Warning

Important

If the argument can be null, the result can be null; if the argument value is null, the result is the null value.

The arguments are defined as follows:

numericExpression

numericExpression is converted to a DECFLOAT from one of the following numerical data types:

  • SMALLINT
  • INTEGER
  • BIGINT
  • FLOAT
  • REAL
  • DECIMAL
  • DECFLOAT

stringExpression

If the argument is a string expression, it can be in any external numerical format. It is converted directly to DECFLOAT with the specified precision. If the CCSID of the string is not in EBCDIC encoding scheme, it is cast to EBCDIC CCSID(37) before conversion takes place.

Other special strings are accepted and converted to their internal DECFLOAT values. These include:

  • NAN
  • SNAN
  • INF
  • INFINITY

precision

The precision can be either short (16) or long (34).

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC AMI Unload for Db2 13.1