The default decimal point can be specified:
The default decimal point can be specified through the following interfaces:
SQL Interface | Specification |
---|---|
Embedded SQL | The *JOB, *PERIOD, *COMMA, or *SYSVAL value
in the OPTION parameter is specified on the Create SQL Program (CRTSQLxxx)
commands. The SET OPTION statement can also be used to specify the DECMPT
parameter within the source of a program containing embedded SQL.
|
Interactive SQL and Run SQL Statements | The DECPNT parameter on the Start SQL (STRSQL)
command or by changing the session attributes. The DECMPT parameter on the
Run SQL Statements (RUNSQLSTM) command.
|
Call Level Interface (CLI) on the server | SQL_ATTR_DATE_FMT and SQL_ATTR_DATE_SEP environment
or connection variables
|
JDBC or SQLJ on the server using IBM(R) Developer Kit for Java | Decimal Separator conneciton property
|
ODBC on a client using the iSeries Access Family ODBC Driver | Decimal Separator in the Advanced Server
Options in ODBC Setup
|
JDBC on a client using the IBM Toolbox for Java | Format in JDBC Setup
|
If the comma is the decimal point, the following rules apply:
Thus, to specify a decimal constant without a fractional part, the trailing comma must be followed by a non-blank character. The non-blank character can be a separator comma, as in:
VALUES(9999999999,, 111)
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.