ILE RPG SQLStored Procedure 设置时间戳选项?
ILE RPG SQLStored Procedure set option for timestamp?
我想使用存储过程在 RPG 中创建新记录。
首先,我将值分配给 table 的每个字段。对于时间戳字段,它是
TSTPfield = %TIMESTAMP();
当我select创建记录时,每条记录的时间戳在末尾都有三个零,如 2018-06-14-11.01.31.028000.
如果我在没有 stoed 过程的 rpg 程序中创建记录,时间戳看起来很正常,没有不正常的零。
如何获得不带零的正确时间戳?我是否必须调整存储过程的 .sql 文件的设置?
我在那里定义了这些选项:
CREATE OR REPLACE PROCEDURE exampleproc
(
**fields**
)
LANGUAGE RPGLE
NOT DETERMINISTIC
MODIFIES SQL DATA
EXTERNAL NAME exampleproc GENERAL
;
我不确定你说的 "I create a record in a rpg program without the stoed procedure"
是什么意思
但是RPG的%timestamp() BIF只支持3位小数精度
Only the first three digits of the fractional seconds portion of the timestamp will be set to a non-zero value. The remaining fractional seconds will be zero.
我想使用存储过程在 RPG 中创建新记录。
首先,我将值分配给 table 的每个字段。对于时间戳字段,它是
TSTPfield = %TIMESTAMP();
当我select创建记录时,每条记录的时间戳在末尾都有三个零,如 2018-06-14-11.01.31.028000.
如果我在没有 stoed 过程的 rpg 程序中创建记录,时间戳看起来很正常,没有不正常的零。
如何获得不带零的正确时间戳?我是否必须调整存储过程的 .sql 文件的设置? 我在那里定义了这些选项:
CREATE OR REPLACE PROCEDURE exampleproc
(
**fields**
)
LANGUAGE RPGLE
NOT DETERMINISTIC
MODIFIES SQL DATA
EXTERNAL NAME exampleproc GENERAL
;
我不确定你说的 "I create a record in a rpg program without the stoed procedure"
是什么意思但是RPG的%timestamp() BIF只支持3位小数精度
Only the first three digits of the fractional seconds portion of the timestamp will be set to a non-zero value. The remaining fractional seconds will be zero.