Hi Guys
I have small problem with my application, please if someone can help. my story is that I have the following table:
Dim1Dim2Dim3Dim4TimestoreproductcustomerTimestoreproductNULLTimestoreNULLNULLTimeNULLNULLNULLNULLNULLNULLNULLNULLstoreproductcustomerNULLstoreproductNULLNULLstoreNULLNULLTimeNULLproductcustomerNULLNULLproductcustomerNULLNULLproductNULLTimestoreNULLcustomerTimeNULLNULLcustomerNULLNULLNULLcustomerTimeNULLproductNULLNULLstoreNULLcustomer
the table is showing all possible combinations of foure dimensions: Product, Store, Time, Customer. each row in my table is representing an element. so now I have another table consists of two columns:
Element_name
Element_parent
now I want to insert each element(Row) from the first table into the element_name in the second table and insert all its parent elements.
for example:
elementProduct,time,Store,null) is the parent of (Product,Time) ,(Product,store) ,(time,store) ,(Product) ,(Time) and (Store). Null values are not mentioned in the example. for sure the top element that has no null values is the parent of all of them and the element that has only NULL's in the four columns is the smallest child.
Therefore, please can someone come up with the code that can insert do this process.
I will appreciate any help.
Eteleeb
I have small problem with my application, please if someone can help. my story is that I have the following table:
Dim1Dim2Dim3Dim4TimestoreproductcustomerTimestoreproductNULLTimestoreNULLNULLTimeNULLNULLNULLNULLNULLNULLNULLNULLstoreproductcustomerNULLstoreproductNULLNULLstoreNULLNULLTimeNULLproductcustomerNULLNULLproductcustomerNULLNULLproductNULLTimestoreNULLcustomerTimeNULLNULLcustomerNULLNULLNULLcustomerTimeNULLproductNULLNULLstoreNULLcustomer
the table is showing all possible combinations of foure dimensions: Product, Store, Time, Customer. each row in my table is representing an element. so now I have another table consists of two columns:
Element_name
Element_parent
now I want to insert each element(Row) from the first table into the element_name in the second table and insert all its parent elements.
for example:
elementProduct,time,Store,null) is the parent of (Product,Time) ,(Product,store) ,(time,store) ,(Product) ,(Time) and (Store). Null values are not mentioned in the example. for sure the top element that has no null values is the parent of all of them and the element that has only NULL's in the four columns is the smallest child.
Therefore, please can someone come up with the code that can insert do this process.
I will appreciate any help.
Eteleeb