从FOR EACH向TEMP-TABLE添加行

时间:2018-09-24 07:19:51

标签: openedge progress-4gl

我正在尝试创建一个临时表,该临时表与数据库中已经存在的表完全一样。如何将每一行添加到临时表?

DEFINE TEMP-TABLE o_ttProducts.

FOR EACH Product:
    /*Add current row to the o_ttProducts temp table*/
END.

1 个答案:

答案 0 :(得分:5)

DEFINE TEMP-TABLE o_ttProducts no-undo like Product.

FOR EACH Product
    no-lock:
    /*Add current row to the o_ttProducts temp table*/
    create o_ttProducts.
    buffer-copy Product to o_ttProducts.
END.