Consultor Eletrônico



Kbase P131611: How to refer to the database name when using SQL-92
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   20/05/2008
Status: Unverified

GOAL:

How to refer to the database name when using SQL-92

GOAL:

How to use catalogs with SQL-92 statements

FACT(s) (Environment):

All Supported Operating Systems
OpenEdge 10.1B
OpenEdge 10.1C

FIX:

A catalog is a named collection of schemas. In OpenEdge SQL, a catalog logically corresponds to a database.
A catalog name can be set at the CONNECT statement:

CONNECT ?database_path? AS CATALOG catalog_name;or in the <database>.oesql.properties file for multi-databases.

[database.MA]
Name=Mass
Catalog=Mass
Location=/usr1/kjain/States/Mass

All data references in SQL follow the syntax:

catalog.schema.table.column.

The following is an example of catalogs named actpay and gledger being used:
SELECT actpay.pub.accounts.name FROM gledger.accounts, actpay.accounts WHERE actpay.pub.accounts.closed = ?n? AND gledger.pub.accounts.closed = ?n?;