1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

  2. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

How to give blank value to integer field in temp table?

Discussão em 'StackOverflow' iniciado por fdantas, Abril 9, 2019.

  1. fdantas

    fdantas Administrator Moderador

    I have written a simple query but want to show blank value to integer field in temp table. As you know if there is no data in integer field then 0 is the default value but our client says it should be blank instead of default value 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



    So when I store these data to temp table White car QTY should be blank instead of 0.

    Note - I cannot change Temp-Table Field Type.

    Continue reading...

Compartilhe esta Página