sander
sander

Reputation: 1654

Adding row from FOR EACH to TEMP-TABLE

I'm trying to create a temp-table which is exactly like an already existing table in the database. How do I add each row to the temp table?

DEFINE TEMP-TABLE o_ttProducts.

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

Upvotes: 2

Views: 1423

Answers (1)

idspispopd
idspispopd

Reputation: 404

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.

Upvotes: 5

Related Questions