The LISTNAMES program produces a report that lists the names of the objects in an analytic workspace. You can limit the list to particular types of objects, and you can have the names for each type of object listed in alphabetical order.
Specifies the name of an attached workspace whose objects you want to list. When you omit the workspace name, LISTNAMES lists the objects in the current workspace. When you use the '*'
(asterisk) argument instead of an analytic workspace name, LISTNAMES produces a separate report for each attached workspace.
Specifies one or more of the following types of objects whose names you want to list: AGGMAP, COMPOSITE, DIMENSION, FORMULA, MODEL, OPTION, PROGRAM, RELATION, VALUESET, VARIABLE, and WORKSHEET. You can include a trailing "S" on any object type, for example, DIMENSIONS
. You can list these object types in any order. ALL (the default) specifies that the names of objects of all these types should be listed.
SORTED (the default, abbreviated SORT) specifies that the object names should be sorted alphabetically. UNSORTED (abbreviated UNSORT) specifies that the object names should not be sorted alphabetically.
Compares the names of the definitions in an analytic workspace to the text pattern you specify and lists the names that match. A definition name is like a text pattern when corresponding characters match. Besides literal matching, LIKE lets you use wildcard characters to match multiple characters in a string. An underscore (_
) character in a pattern matches any single character. A percent (%
) character in a pattern matches zero or more characters.
NAME is a special dimension that is used by Oracle OLAP to organize the list of objects in an analytic workspace. Its values are the names of the objects defined in the current workspace. (
You cannot explicitly change the values of the NAME dimension. Instead the values are changed as DEFINE, DELETE, MOVE, or RENAME statements execute. Also, you cannot use a qualified object name to specify the NAME dimension of an analytic workspace that is not the current workspace.
See also:
LISTNAMES programExample 10-33 Listing Dimensions
Suppose you want a list of all the dimensions in an analytic workspace. First, use a LIMIT command and the OBJ function to limit the status of the NAME dimension. Then use a STATUS statement to produce a list of dimensions. Because the values returned by OBJ(TYPE)
are always in uppercase, you must use 'DIMENSION'
(not 'dimension'
) in the LIMIT statement to get a match. The statements
LIMIT NAME TO OBJ(TYPE) EQ 'DIMENSION' STATUS NAME
produce the following output.
The current status of NAME is: PRODUCT, DISTRICT, DIVISION, LINE, REGION, MARKETLEVEL, MARKET, MONTH, YEAR, QUARTER
Example 10-34 Listing Relations
Suppose you want to see the definitions of all the relations in an analytic workspace. Use the LIMIT command and the OBJ function to select these names. Then use DESCRIBE to produce a list of their definitions. The statements
LIMIT NAME TO OBJ(TYPE) EQ 'RELATION' DESCRIBE
produce the following output.
DEFINE REGION.DISTRICT RELATION REGION <DISTRICT> LD REGION for each DISTRICT DEFINE DIVISION.PRODUCT RELATION DIVISION <PRODUCT> LD DIVISION for each PRODUCT DEFINE MLV.MARKET RELATION MARKETLEVEL <MARKET> DEFINE MARKET.MARKET RELATION MARKET <MARKET> LD Self-relation for the Market Dimension
Example 10-35 Listing of DEMO Workspace Objects
This example lists the dimensions, variables, and relations in the current workspace. The statement
LISTNAMES dimension variable relation
produces the following output for the DEMO workspace.
10 DIMENSIONs 18 VARIABLEs 4 RELATIONs ---------------- ---------------- ---------------- DISTRICT ACTUAL DIVISION.PRODUCT DIVISION ADVERTISING MARKET.MARKET LINE BUDGET MLV.MARKET MARKET DEMOVER REGION.DISTRICT MARKETLEVEL EXPENSE MONTH FCST PRODUCT INDUSTRY.SALES QUARTER NAME.LINE REGION NAME.PRODUCT YEAR NATIONAL.SALES PRICE PRODUCT.MEMO SALES SALES.FORECAST SALES.PLAN SHARE UNITS UNITS.M