Hi Gurus!
I have the following problem:
2 tables:
drop table "PULZUS_DM"."TEST_TABL_1";
CREATE COLUMN TABLE "PULZUS_DM"."TEST_TABL_1" ("MY_ID" INTEGER, "MY_NUM" INTEGER);
insert into "PULZUS_DM"."TEST_TABL_1" values(1, 2);
insert into "PULZUS_DM"."TEST_TABL_1" values(2, 1);
insert into "PULZUS_DM"."TEST_TABL_1" values(3, 1);
drop table "PULZUS_DM"."TEST_TABL_2";
CREATE COLUMN TABLE "PULZUS_DM"."TEST_TABL_2" ("MY_ID" INTEGER, "MY_ATTRIBUTE" NVARCHAR(6), "MY_OTHER_NUM" INTEGER);
insert into "PULZUS_DM"."TEST_TABL_2" values(1, 'attr01', 5);
insert into "PULZUS_DM"."TEST_TABL_2" values(1, 'attr02', 2);
insert into "PULZUS_DM"."TEST_TABL_2" values(2, 'attr01', 5);
insert into "PULZUS_DM"."TEST_TABL_2" values(3, 'attr02', 2);
I put these tables in TEST_AN_VIEW01 and TEST_AN_VIEW02. The measures are MY_NUM and MY_OTHER_NUM.
In a calculation view I join these analytic views from projections (I have to put some filters before...) with inner join, cardinality 1:n.
It looks like the attached pic.
For this view I get an unexpected result:
MY_ID | MY_NUM_SUM |
---|---|
1 | 2 |
2 | 1 |
3 | 1 |
Clearly it should be 4 for the first MY_ID since:
MY_ID | MY_ATTRIBUTE | MY_NUM_SUM |
---|---|---|
1 | attr01 | 2 |
1 | attr02 | 2 |
2 | attr01 | 1 |
3 | attr02 | 1 |
If I use only the tables instead of the analytic views (that I cannot do in my real problem), than it calculates everything well (the MY_NUM_SUM for MY_ID = 1 is 4...).
Is it a bug, or I just do not get something with the join and analytic view realtionship?
Thanks,
David.