Set Specification

Set Specification

Welcome to our Knowledge Base

Documentation | Blog | Demos | Support

< All Topics
Print

Set Specification

Set Specification

Identifies particular records in an Zim database.

Syntax

object [WHERE clause] [SORTED BY clause] [KEEP clause]

Parameters

objectThe name of an EntitySet, relationship, form, application document, or result set. Role names can be used for EntitySets or relationships. Any number of objects can be specified, provided that they are meaningful in context.

Comments

A set specification (sometimes called a setspec) is a statement that uses EntitySets, relationships, forms, application documents, and result sets as the source of the set being declared. Each object in the set specification is called a component. (Result sets can represent more than one component.)
A set specification can also include a condition that limits record selection (WHERE clause), a sorting statement (SORTED BY clause), and a component projection list that limits the number of components in the resulting set (KEEP clause).
Any number of objects can be declared. But, if you declare more than one object, then you must declare the relationships through which records in those objects are associated.
Each object can be further qualified using any valid combination of the following subcommands:
-> (Dynamic rename), COMPLETE, UNRELATED, USING
and in particular circumstances:
INTERSECT, MINUS, UNION
Set specifications are processed, in order, from left to right.

Example

list all Employees

The simplest type of set specification. The set consists of all of the records in the EntitySet Employees.

list all Employees where LastName = “Smith”

Includes a condition for record selection.

list all Employees sorted by EmpNum

Includes a sorting subcommand.

list all Employees where LastName = “Smith” sorted by EmpNum

Combines a condition and a sort.

list all Employees WorkIn Departments

The relationship that defines the association (WorkIn) must be included because two EntitySets are being declared. All associated records in Employees and Departments are included.

list all Employees WorkIn Departments keep Departments

Adds a component projection list. Of associated records in Employees WorkIn Departments, only the (unique) records from Departments are included in the set.

list all Employees (unrelated) WorkIn Departments

The subcommand UNRELATED modifies the relationship; all records in Employees that are unassociated with Departments are included.

See Also

Set Specification (ISQL)

Was this article helpful?
5 out of 5 stars

1 rating

5 Stars 100%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *

pt_BRPortuguese