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

Command::

enter a record



Parameters


Returns/Result


Examples


Reference

enter a record

Type

Processing Command

Purpose

The enter a record command adds a record to the specified table.

Syntax

Enter a record in TABLENAME

Usage

The enter a record command must specify a target table and the field values to be entered into the table. Alternatively, you can specify another table from which to copy field data using the copy all from command (see Example 2, below). As data is entered in the table, automatic error checking is performed, including checks for uniqueness, required fields, range checks, etc. Any errors are logged to an exception file.

Example 1

for MEMBERS with TOTAL DUE > 150 ;

enter a record in CATALOG MEMBERS

NAME 1 := MEMBERS FIRST NAME ;

NAME 2 := MEMBERS LAST NAME ;

HOME ADDRESS := MEMBERS ADDRESS ;

HOME CITY := MEMBERS CITY ;

HOME STATE := MEMBERS STATE ;

ZIP CODE := MEMBERS ZIP CODE .

end

 

This script tells DataEase: (1) Select all the MEMBERS records that have an TOTAL DUE greater than $150, and (2) for each MEMBERS record selected, enter a record in the CATALOGMEMBERS table, copying the information from each field in the MEMBERS table to the assigned field in the CATALOG MEMBERS table.

Example 1 simply copies information from the MEMBERS table into the target table. If the source table and target table have identical field names, you can accomplish the same result with the simpler script shown in Example 2.

 

Example 2

for MEMBERS with TOTAL DUE > 150 ;

enter a record in CATALOG MEMBERS

copy all from MEMBERS .

end

See Also


On the forum about enter a record

On the blog about enter a record