Previous Next

ADD-FIELDS-FROM( ) method
Copies the field definitions from the specified source table to a temp-table. It is intended for use when a temp-table represents a join. If it finds fields that are already in the temp-table, it ignores them.
This method cannot be called after TEMP-TABLE-PREPARE( ) has been called unless CLEAR( ) is called first.
Return type:
Applies to:
 
Syntax 
ADD-FIELDS-FROM ( { source-buffer-handle-exp | source-table-name-exp }
  [ , except-list-exp ] )
source-buffer-handle-exp
An expression that evaluates to a buffer handle from which to copy the field definitions.
source-table-name-exp
An expression that evaluates to a table name from which to copy the field definitions.
except-list-exp
A character expression that evaluates to a comma-separated list of field names to be excluded from the new table definition.
The following example fragment creates a join temp-table from the Customer and Order tables:
 
DEFINE VARIABLE tth AS HANDLE NO-UNDO.
 
CREATE TEMP-TABLE tth.
tth:ADD-FIELDS-FROM("Customer").
tth:ADD-FIELDS-FROM("Order").
tth:TEMP-TABLE-PREPARE("cust-ord").
. . .
The following fragment creates a temp-table from the Customer table except for the SalesRep field:
 
tth:ADD-FIELDS-FROM("Customer", "SalesRep").
Note:
This method does not create any indexes. Either indexes must be added specifically through one of the ADD-INDEX methods, or a default index is created.

Previous Next
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates.