Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2006
    Posts
    1

    Unanswered: Create Dimension (ora-30366)

    Hi,
    I need help with error ora-30366

    I´m trying to create a dimension with 2 tables and 1 field in commom.(cod_dist)

    /*********CODE********/

    CREATE DIMENSION d_dwd_cdf1
    LEVEL cod_cliente IS (t_dwd_cdf1.cod_cliente)
    LEVEL distribuidor IS (t_dwd_cdf1.cod_dist)
    LEVEL central_compra IS (t_dwd_cdf2.cod_central_compra)
    HIERARCHY direcciones_facturación (
    cod_cliente CHILD OF
    distribuidor CHILD OF
    central_compra
    JOIN KEY (t_dwd_cdf2.cod_dist) REFERENCES distribuidor)

    /******END CODE********/

    If I execute this code, I get ora-30366 with this text:
    "child JOIN KEY columns not in same relation as child level"

    /*********CODE********/

    CREATE DIMENSION d_dwd_cdf1
    LEVEL cod_cliente IS (t_dwd_cdf1.cod_cliente)
    LEVEL distribuidor IS (t_dwd_cdf2.cod_dist) <-- Change Valor 1 to 2.
    LEVEL central_compra IS (t_dwd_cdf2.cod_central_compra)
    HIERARCHY direcciones_facturación (
    cod_cliente CHILD OF
    distribuidor CHILD OF
    central_compra
    JOIN KEY (t_dwd_cdf1.cod_dist) REFERENCES distribuidor) <-- Change Valor 2 to 1.

    /******END CODE********/
    If I do the changes specified, I create the object correctly.
    Can anyone explain the situation more accurately, because I don`t understand rightly the error message.
    Any help would be very appreciated.
    Regards,

  2. #2
    Join Date
    May 2004
    Location
    Dominican Republic
    Posts
    721
    First one fails because in your hierarchy, distribuidor is a CHILD OF central_compra (join key t_dwd_cdf2.cod_dist). You need to make your join keys to be references by parents, not by their childrens.

    On the second one, it works because cod_cliente (join key t_dwd_cdf1.cod_dist) is a CHILD OF distribuidor this time.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •