Tables stored in the ODBC registry are connected to a catalog and schema, which are ways to organize and categorize tables in a database. The default catalog is master. Queries to tables that are registered in the master catalog do not need to specify the catalog. There are three configurations to a query that use the catalog, schema, and table format:
FROM <catalog>.<schema>.<table>—Returns the <table> contained in the <schema> contained in the <catalog>.
FROM <schema>.<table>—Returns the <table> contained in the <schema> contained in the default catalog.
FROM <table>— Returns the first table in the registry that is contained in the default catalog and that matches <table>. This ignores the schema value.
For example, If the tables with the name mass_sales and vermont_sales are contained within a catalog named state_sales and a schema named northeast_sales, then you can access them with statements such as:
SELECT ... FROM state_sales.northeast_sales.mass_sales;
SELECT ... FROM state_sales.northeast_sales.vermont_sales;
When the data source is a cPlan, you can also access individual named inputs in the cPlan by adding @ followed by the input name.
For example:
FROM <catalog>.<schema>.<cplan_table>@<input_name>
When the data source is a measure factory, you can access individual scopes by adding @ followed by the scope name.
For example:
FROM <catalog>.<schema>.<factory_table>@<scope_name>