Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all
Ok, I have a question about joining some tables.
I have following tables.
fact:
productN, product type, orderN, customerN
321654, A, 50, 132
987654, B, 20, 423
654987, C, 13, 512
so on. I have 2 tables contains information for product A B and others.
type_AB:
orderN, information
type_other:
customerN, information
how do I join them? Feel free for any suggest.
Regards.
Muncho
As I don't know the purpose It's very hard to help out.
let me get this straight - You need to join two information tables to your facts table. Your keys are orderN and customerN. Do you also need product type in the key?
i have 2 information table. first information table have orderN key field and it should join where product type A and B in fact table. Second table should join where not product type A and B. key is customerN.
Hope you got it know.
Hi Muncho,
If I undestand what your are trying to do :
- Rename in your fact table orderN and customerN (example orderN_origin and customerN_origin) ;
- Add in fact a calculated column named orderN as : if(match([product type],'A','B')>0,orderN_origin) ;
- Add in fact a calculated column named customerN as : if(match([product type],'A','B')=0,customerN_origin) ;
You will obtain
productN, product type, orderN, customerN, orderN_origin, customerN_origin
321654, A, 50, , 50, 132
987654, B, 20, , 20, 423
654987, C, , 13, 13 , 512
Then you can join your tables.
Regards,
Vincent
Hello Vincent,
Ok. I got your your idea.
Thank you very much ^^
See if this sample can help you.