Temp-table definition - Forum - OpenEdge General - Progress Community
 Forum

Temp-table definition

  • Hi folks,

    I have the following problem.

    With the temp-db maintenance tool we have a temp-table called :

    tt-custorder.

    In the program we also have defined the temp-table tt-cust.

    After the definition there's also a 'define temp-table tt-custcopy like tt-cust.'

    The problem is now that the temp-table tt-custcopy have the fields from the temp-table tt-custorder. That isn't really what I want.

    So this is the construction :

    /* ***********Included Temp-Table & Buffer definitions **************** */

    ....

    /* Local Variable Definitions */

    DEF TEMP-TABLE Tt-custcopy LIKE tt-cust.

  • If that is not what you want you shouldn't use the "LIKE"!

    Define the temp-table from scratch:

    def temp-table tt-custcopy no-undo

    field yourfirstfield as char

    field yoursecondfield as int.

  • I suspect he means that tt-custcopy is somehow inheriting the definition of tt-custorder, not tt-cust.

  • I suspect the same, it sounds like it is matching on the closest common name. I suggest naming the tempTables to a unique format like tt-CustCopy and tt-Customer