Home » SQL & PL/SQL » SQL & PL/SQL » Dimensions
Dimensions [message #22715] Wed, 23 October 2002 22:55 Go to next message
rajesh
Messages: 173
Registered: November 1998
Senior Member
I want to create a dimension and hierarchy. I created the table location as follows

CREATE TABLE location (
city VARCHAR2(30),
state VARCHAR2(30),
country VARCHAR2(30),
mayor VARCHAR2(30),
governor VARCHAR2(30) );

I created the dimension location_dim as follows

CREATE DIMENSION location_dim
LEVEL city IS location.city
LEVEL state IS location.state
LEVEL country IS location.country

But when i try to create the hierarchy loc_rollup as follows,

HIERARCHY loc_rollup (
city CHILD OF
state CHILD OF
country )

I get the following error

SQL> HIERARCHY loc_rollup (
SP2-0734: unknown command beginning "HIERARCHY ..." - rest of line ignored.
SQL>
SQL> city CHILD OF
SP2-0734: unknown command beginning "city C..." - rest of line ignored.
SQL> state CHILD OF
SP2-0734: unknown command beginning "state C..." - rest of line ignored.
SQL> country )
SP2-0042: unknown command "country )" - rest of line ignored.
SP2-0044: For a list of known commands enter HELP

What is going wrong? Please reply to my email id.
Re: Dimensions [message #22717 is a reply to message #22715] Thu, 24 October 2002 00:21 Go to previous message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Look here:
http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/server.920/a96540/statements_57a.htm#2061859

HIERARCHY is a part of the CREATE DIMENSION statement.

This implies that you cannot use it standalone.

MHE
Previous Topic: Memo equivalent data type?
Next Topic: Prducing serial no. alongwith records/rows
Goto Forum:
  


Current Time: Sat May 04 07:47:34 CDT 2024