User Tools

Site Tools

Navigation:  Language Reference > 4 - Entity Declarations > View Structures >====== PROJECT (set view fields) ====== Previous pageReturn to chapter overviewNext page

PROJECT( fields )


PROJECT Declares the fields retrieved for the VIEW.
fields A comma delimited list of fields (including prefixes) from the primary file of the VIEW, or the secondary related file named in the JOIN structure, containing the PROJECT declaration.

The PROJECT statement declares fields retrieved for a relational “Project” operation. A relational “Project” operation retrieves only the specified fields from the file, not the entire record structure.

A PROJECT statement may be declared in the VIEW, or within one of its component JOIN structures. If there is no PROJECT declaration in the VIEW or JOIN structure, all fields in the relevant file are retrieved.

If a PROJECT statement is present in the VIEW or JOIN structure, only the fields explicitly declared in the PROJECT are guaranteed to be retrieved. The contents of any fields that are not contained in PROJECT statements are undefined. Depending on the abilites of the particular database engine you are using, other fields may be retrieved. However, you should not rely on this as future changes or changes in the database driver may preclude these fields from being retrieved.


Detail   FILE,DRIVER('Clarion'),PRE(Dtl) !Declare detail file layout

OrderKey   KEY(Dtl:OrderNumber)

Record      RECORD

OrderNumber  LONG

Item         LONG

Quantity     SHORT

Description  STRING(20)  !Line item comment



Product  FILE,DRIVER('Clarion'),PRE(Pro) !Declare product file layout

ItemKey   KEY(Pro:Item)

Record    RECORD

Item        LONG

Description STRING(20)  !Product description

Price       DECIMAL(9,2)



ViewOrder VIEW(Detail)






project_set_view_fields_.htm.txt · Last modified: 2021/04/15 15:57 by