Creating temporary tables

Code:
define temp-table tt-<name>
field card-number as integer
field spend as decimal
index i-main is unique card-number.
 
to add to that: Unless necessary always define your temp-table as no-undo.

Casper.
 
While we're at it:

Since the buffer scope of a TEMP-TABLE is not the same as it would be for a database table I always use named buffers & strong scoping for temp tables when populating them.

Somthing like:

DEFINE TEMP-TABLE ttXyz NO-UNDO ....

DEFINE BUFFER b_ttXyz FOR ttXyz.

DO FOR b_ttXyz:
CREATE b_ttXyz.
ASSIGN ...
END.


HTH, RealHeavyDude.
 
Back
Top