如何给临时表中的整数字段空白值?

Thi*_*iru 0 progress-4gl openedge

我写了一个简单的查询,但想在临时表中将空白值显示为整数字段。如您所知,如果整数字段中没有数据,则默认值为0,但我们的客户表示应为空,而不是默认值0。

DEFINE TEMP-TABLE tt_data
       FIELD CarColour AS CHARACTER
       FIELD Qty  AS INTEGER.

FOR EACH <db> NO-LOCK WHERE <db.field> = "White Car" AND <db.field> = "Red Car":
         DISPLAY <db.field1> <db.field2>.
END.

/* Note  <db.field1> is CHARACTER  <db.field2> is INTEGER */

/* DISPLAYED VALUE IS */

WHITE    0  /* There is no qty for this white car so its showing default value 0 */

RED     100

Run Code Online (Sandbox Code Playgroud)

因此,当我将这些数据存储到临时表时,白色汽车数量应为空白而不是0。

注意-我无法更改“临时表”字段类型。

Mik*_*ner 5

在这些字段上使用FORMAT选项。

DISPLAY 0 FORMAT ">>>,>>>" SKIP 
        1 FORMAT ">>>,>>>" SKIP 
Run Code Online (Sandbox Code Playgroud)