Easy to Create, Easy to Change - Easy to use!

Command::

copy all from



Parameters


Returns/Result


Examples


Reference

copy all from

Type

Processing Command

Purpose

The copy all from command copies values in identically named fields from one table to another.

Syntax

copy all from TABLENAME|data-entry ;|.

Usage

The copy all from statement must specify a Source table and must be immediately preceded by a modify records or enter a record command. The Source table can be any relationship previously specified in the script. The procedure's Data-entry form can also be used as the Source.

The Target table is specified at the end of the preceding modify records or enter a record command. The Target table can be any table you specify; the default is the Primary table specified in the most recent for statement. Data is copied into each Target field from the identically named field in the Source table.

When you use the copy all from command, data is transferred only between fields with the same fieldname. Non-matching fields are ignored.

Example

Assume we've defined a target form called CATALOG LIST. This form contains only those members who receive a special Christmas promotional catalog.

 

for MEMBERS with

any RESERVATIONS TOTAL DUE > 1500 ;

enter a record in CATALOG MEMBERS

copy all from MEMBERS .

end

 

This script tells DataEase: (1) Select all the MEMBERS records that have any related RESERVATION record with a TOTAL DUE greater than $1500, and (2) for each MEMBERS record selected, enter a record in the CATALOG MEMBERS table and copy all the information from the source MEMBERS record into the target CATALOG MEMBERS record, based on matching field names.

See Also


On the forum about copy all from

On the blog about copy all from