Reporting : Native reporting system : Reporting system command language : SELECT command
  
SELECT command
Editing or adding layout instructions for the report fields
Use the SELECT command to specify the field-identifier(s) and column layout for a report. A field-identifier is the actual field name(s) or column heading(s) to be printed in a Tabular report. For example, some valid field-identifiers are: Name, Update Date, Audit, or Type. A valid field-identifier is any field name in the database; both predefined fields (see Predefined fields) and user-defined fields (see FIELD command) can be reported.
The SELECT command is used to select data to be printed. It can be thought of as a synonym for “print a column called”, While editing or adding column layout instructions, you can specify:
 
See
State Transition diagram name
Column header appearance
Column header placement
Column header name
Column placement (down or across the page)
SELECT command structure
The structure of the SELECT command is:
{ SELECT field-identifier-1 subcommand qualifier, field-identifier-2 subcommand qualifier }
The SELECT command uses field-identifiers which may be followed by a series of subcommands and subcommand-identifiers used to position the field on the page, specify the font to be used for the field, and the position of each field’s legend. Commas are placed between the field-identifier group, not between the subcommands.
For example, by default, the field-identifier name is also the name of the column header in the report. But suppose Name is too vague for that column header because it is really the “symbol name”. To print Symbol Name as the column heading, the command statement looks like this:
Rules for using the SELECT command
To create a correct SELECT command statement (including field-identifiers, subcommands, and subcommand qualifiers), follow these rules:
1 Follow each SELECT command with a field-identifier, its related subcommands, and their respective subcommand-identifiers and separate each subcommand group with a comma.
2 Use white space to separate the SELECT command, subcommand, and subcommand-identifier.
3 Place a comma immediately after the last subcommand-identifier in a group with no white space between the comma and subcommand-identifier. White space must follow the comma.
4 Start a new line for each field (property) whose characteristics are being defined when a field has multiple formatting specifications. Each new line begins with the SELECT command, followed by the first field, followed by the first set of placement and font specifications, followed by a comma. It is the comma that separates one field from another. Repeat that sequence for each new line. This extra notation makes the file more readable.
5 The SELECT command places property names in columns from left to right across the page. If the fields exceed the space available on the page, columns are wrapped onto the next line. When fields are wrapped onto another line, the field legends are wrapped onto another line also.
6 To control how columns are placed on the report, choose to use one SELECT command with multiple field identifiers which produces a report with one column. Or, use multiple SELECT commands each with its own field identifier which produces a report with the number of columns equal to the number of SELECT command used. In other words, each iteration of SELECT produces a new line in the report.
See also Printing one or more columns, Select column header and placement, and Select column header name.
Select state transition diagram name
At the diagram level of the Entity Table, information on all State Transition diagrams in the encyclopedia is placed in the extraction database. See also WHERE command.
SELECT Name, WHERE Class = Diagram, WHERE Type = "State Transition"
Select column header appearance
Use these subcommands to refer to a previously defined font and use its characteristics to print a column header.
{ SELECT field-identifier
FONT font-identifier
Use the FONT subcommand to print and position the column heading.
LEGENDFONT font-identifier
Use the LEGENDFONT subcommand to print and position the column heading.
Refer also to Printing one or more columns, Select column header and placement, and Select column header name.
Examples – SELECT command
These are some of the most commonly used SELECT subcommands and a description of what the subcommand will do to how the report columns are formatted.
This SELECT subcommand syntax
Affects the printed report in this way
Example 1
  
SELECT Name, Type
This command specifies “Print two stacked report columns; one labeled Name, one labeled Type”.
Example 2
  
SELECT "Name" LEGEND "Used by
Attribute" LABEL LEFT
LEGENDFONT Font6 WIDTH 2.00
This command specifies “Print column heading Used by Attribute instead of Name. Align the label at column left. Make the heading font size point 6. Make the column two inches wide”.
Example 3
  
SELECT "Name" LEGEND "Index"
SELECT "Clustered"
SELECT "DB Space"
SELECT "Fill Factor"
SELECT "FillfFactor"
This command specifies “Print a column heading of Index instead of Name. In side-by-side rows also print these fields: Clustered, DB Space, Fill Factor, and FillfFactor”.
Example – using identifiers with the SELECT command
The following is an example of how the text identifier can be used in a SELECT command:
SELECT Name, "From Association", " To Association"
WHERE Class = Symbol
WHERE Type = Relation
See also From association and To association.
The above example produces a report having three columns. The first column contains the name of the Relation Line (as specified by the WHERE command statement). The second and third columns list the cardinality at the beginning and end of the line. The cardinality is specified as Unmarked, Only One, Zero or One, One or Many, Zero, One or Many, Supertype, Subtype, or Unknown.
Parent topic
Reporting system command language