• No se han encontrado resultados

DISPOSICIONES MÍNIMAS DE SEGURIDAD Y SALUD QUE DEBEN APLICARSE EN LAS

4 PLIEGO DE CONDICIONES GENERALES

4.9 DISPOSICIONES MÍNIMAS DE SEGURIDAD Y SALUD QUE DEBEN APLICARSE EN LAS

Clauses

connection name

Specify the connection name, which can be no more than eight characters in length.

databasename/username/password

This specifies the database to connect to.

Regardless of how many database connections have been established, there is only one current database and one current cursor at any given moment. The current database and cursor is the one to which a connection was established at sign-on or by the last CONNECT or USE command. If the database name is not specified in a BEGIN CONNECTION command, it is assumed that the current database will remain unchanged.

If you are connecting to the MAIN database, specify the name of the server where the MAIN database is instead of the database name itself.

username/password

Each valid user of the database is assigned a username (authorization ID) and password.

The BEGIN CONNECTION command can establish only one connection to the database through a username.

If you do not specify a username/password, the connection takes place with the same username/password as the current cursor. The current cursor is the one that was established at sign-on or with the last CONNECT or USE command.

Example

The following example creates a new connection:

BEGIN CONNECTION CH1 ISLAND/SYSADM/SYSADM;

See also

END CONNECTION SHOW CONNECTION

BREAK

This command suppresses repeating values for a specified column within a group. It inserts a blank line when the column changes value or after the last row of a report has been displayed.

If you entered the COMPUTE command, appropriate totals and subtotals are computed and printed for each group of rows separated by blank lines.

Once you enter the BREAK ON command, all subsequent SQL queries are displayed with the specified breaks. To add or remove a break specification, you must enter a new BREAK OFF command.

Unlike the COMPUTE and COLUMN commands, the BREAK command is not cumulative.

To turn off breaks, enter the BREAK OFF command. The BREAK OFF command also removes all specified COMPUTEs.

Clauses

ON/OFF

Turns BREAK capability on or off. REPORT

This specifies that a break occurs after the last row of the report. This is usually specified when an aggregate for the entire report needs to be computed (such as a grand total).

column list

The column list contains column-IDs separated by one or more blanks. Column-ids can be either:

• Position number of the column in a subsequent SELECT command. • An alias specified with the COLUMN command.

The breaks occur in the same order as specified in the column list. column list

ON OFF BREAK

BTITLE

SQLTalk does not check to see if a SQL query results in a sorted order that is the same as the specified break order. You must ensure that a subsequent SELECT command contains an appropriate ORDER BY clause.

Examples

The following command requests a break on the column DEPTNO.

BREAK ON 1;

SELECT DEPTNO, PROJNO, SUM(SAL) FROM EMP ORDER BY DEPTNO, PROJNO;

The following command requests a break on the columns DEPTNO and PROJNO, and on the last page of the report.

BREAK ON REPORT 1 2;

SELECT DEPTNO, PROJNO, SUM(SAL) FROM EMP ORDER BY DEPTNO, PROJNO;

See also

COLUMN COMPUTE SHOW REPORT

BTITLE

This command displays a title on the bottom of each page of a report. Once you have entered this command, the results of all subsequent SELECT commands are

displayed with this bottom title.

You can change the bottom title by giving another BTITLE command or it can be turned off by giving the BTITLE OFF command. You can turn on BTITLE again with the BTITLE ON command.

BTITLE ‘footer string’

OFF ON

DATE

ON

OFF PAGE OFF

This command is cumulative, meaning that once the title has been turned on, portions of it can be changed (such as adding a date or a page number).

Clauses

'footer string'

You must enclose the footer string in single quotes.

The string can consist of up to three separate substrings, each delimited by the vertical bar ( | ) character. The | causes the substring that follows it to be displayed on a new line (multi-line footer).

All the lines of the footer are automatically centered within the display width of the page. The display width of the page is specified by the SET LINESIZE command.

DATE

If this is ON, the current date appears on the bottom left hand corner of each page of the report. The date is displayed in Mon dd, yyyy format (such as April 25, 1996). The date is always displayed on the last line of the page, regardless of the number of lines in the bottom title.

PAGE

If this is ON, the current page number is displayed on the bottom right hand corner of each page of the report as 'Page n', where n is the page number. The page number is always displayed on the last line of the page, regardless of the number of lines in the bottom title.

Example

Shown below is a BTITLE command and the resulting title.

BTITLE 'COMPANY CONFIDENTIAL|***' DATE ON PAGE ON;

See also

SET LINESIZE

COMPANY CONFIDENTIAL

COLUMN

SHOW REPORT TTITLE

COLUMN

This command sets attributes that control the display format and break processing for a column in a report.

After you have entered this command, the results of all subsequent SELECT commands reflect the attributes that you specified.

You can specify more than one COLUMN command for a single column. The effect of this is cumulative, except that a new COLUMN command overrides an attribute

COLUMN column ID ALIAS OFF

alias name

HEADING ‘column title’ WIDTH OFF

data width

PICTURE ‘picture string’ NULLS ‘replacement string’

OFF