SETDATAMAPPING Column Constraint

From Lianjapedia
Jump to: navigation, search

Purpose

Column constraint to specify the display data mapping for a column

Syntax

SET SETDATAMAPPING <expC>

See Also

ADESC(), AFIELDS(), ALTER TABLE, ASTORE(), ASTRING(), Getdatamapping Column Constraint, Constraints, CREATE TABLE, Data Mapping, DBF(), FIELD(), FIELDAUTOSUGGESTIONS(), FIELDAUTOSUGGESTIONHEADERS(), FIELDCHOICES(), FIELDINFO(), FIELDNAME(), FILTER(), FLDCOUNT(), FLDLIST(), GETDATAMAPPING(), INDEX, INDEXKEY(), KEYLOOKUP(), LABEL(), LIST DICTIONARY, NDX(), RTOS()

Description

A constraint is used to define rules that help to provide data integrity. Column constraints are specific to the column name specified. You must have ALTER privilege on the table. The table will be locked for EXCLUSIVE use during the operation.

The SETDATAMAPPING column constraint is used to specify the update data mapping for a column.

Example

open database southwind
alter table "products" modify constraint supplierid set choices 'select companyname from suppliers order by companyname'
alter table "products" modify constraint supplierid set getdatamapping 'keylookup("suppliers", "supplierid",{}, companyname)'
alter table "products" modify constraint supplierid set setdatamapping 'keylookup("suppliers", "companyname","{}", supplierid)'