Was this helpful?
Loadtable
Appends rows of data to a table field's data set.
Examples--loadtable statement:
Example 1:
This example loads data from variables into the ename and eno columns of the employee table field:
## loadtable empform employee (ename = vname,
##                              eno = vnum)
Example 2:
This example loads all values from the employee database table into the employee table field:
##  range of e is employee
##  retrieve (vnum = e.eno, vname = e.ename,
##           vage = e.age, vsal = e.sal,
##           vdept = e.dept)
## {
##   loadtable empform employee
##        (eno = vnum, ename = vname
##             age = vage, sal = vsal,
##             dept = vdept)
## }
Example 3:
This example loads information about an employee into a table field
## loadtable empform employee
##   (ename = name, spouse = vspouse:null_indicator,
##   manager = null)
Example 4:
This example loads the employee table with one row using a loadtable target list:
addresses(1) = address_of(vnum)
addresses(2) = address_of(vname)
addresses(3) = address_of(vage)
addresses(4) = address_of(vsal)
load_target_string = "eno = %i4, ename = %c, age = %I4, sal = %f4"
## loadtable empform employee (param(load_target_string,
  addresses))
Last modified date: 04/03/2024