Temp-table definition

Posted by bart.syryn on 16-Dec-2008 09:45

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.

All Replies

Posted by Admin on 03-Feb-2009 05:12

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.

Posted by kevin_saunders on 03-Feb-2009 05:31

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

Posted by rmarshal on 10-Feb-2009 13:07

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

This thread is closed