Bala,

Couple of things, first you can find lots of
documentation and examples in Oracle 8i Data
Warehousing Guide (ch-9 Dimesions, ch-15-summary
advisor and ch-19 Query Rewrite). Also, dimensaions
are not used in query syntax but used by Optimizer for
query rewites and for better understanding of the
innate nature of the data. In an OLAP environment you
can't go wrong declaring dimensions and hierarchies
but they are just declarative constructs for the
Optimizer much like Optimizer Hints.

Im not sure if there is more to your question but
would the following select get you the mobil number
transactions?

SELECT co.company_code,
       co.company_desc,
       co.parent_company_code,
       NVL(txn.mobil_num,'No mobile usage on
'||txn_date)
  FROM company_dim co
 WHERE co.company_code = desired_company_co
   AND co.parent_company_code = txn.company_code (+)
   AND txn.activity_date = txn_date;



--- "Bala, Prakash" <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I am a newbie to this OLAP area. 
> 
> I have this table (company_dimension) where every
> company has a parent,
> which in turn can be a child to another parent and
> so on. It is about 10
> levels deep.
> 
> TEST@D0MARS> desc company_dimension
>  Name                          Null?    Type
>  ----------------------------- --------
> --------------------------------
>  COMPANY_CODE                  NOT NULL VARCHAR2(50)
> ---> primary key
>  COMPANY_DESC                          
> VARCHAR2(100)
>  PARENT_COMPANY_CODE                    VARCHAR2(50)
> ---> foreign key
> pointing to company_code
> 
> 
> The following table maintains the mobile phone
> numbers for every company.
> 
> TEST@D0MARS> desc DLY_TRANSACTION_DETAIL
>  Name                           Null?  Type
>  ------------------------------ ------
> --------------------------------
>  ACTIVITY_DATE                         DATE
>  COMPANY_CODE                          VARCHAR2(10)
> ---> foreign key to the
> company_dimension table
>  MOBILE_NUMBER                         NUMBER(10)
> 
> The requirement is to get all the phone numbers for
> a given company and its
> children for a given day. Since I cannot join these
> 2 tables using the
> 'connect by' clause, how can I accomplish it,
> without using a sub-query?
> (actually 2 other dimensions play a role in the
> above table and I have
> simplified the structure)
> 
> Created a dimension on the company_dimension table
> and used the
> dbms_olap.validate_dimension procedure to validate
> it. Everything looks
> good, but none of the manuals explains how to use
> the dimension in a query.
> 
> This is Oracle 8.1.7 on Sun Solaris.
> 
> 
> Thanks in advance.
> 
> Prakash
> -- 
> Please see the official ORACLE-L FAQ:
> http://www.orafaq.com
> -- 
> Author: Bala, Prakash
>   INET: [EMAIL PROTECTED]
> 
> Fat City Network Services    -- (858) 538-5051  FAX:
> (858) 538-5051
> San Diego, California        -- Public Internet
> access / Mailing Lists
>
--------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an
> E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of
> 'ListGuru') and in
> the message BODY, include a line containing: UNSUB
> ORACLE-L
> (or the name of mailing list you want to be removed
> from).  You may
> also send the HELP command for other information
> (like subscribing).


=====

Sundeep Maini 
Consultant 
Currently on Assignement at Marshfield Clinic WI 
[EMAIL PROTECTED] 

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: sundeep maini
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to