none
An advanced Join ( Sales Detail , Sales Order , sales Reason ) RRS feed

  • Question

  • Greeting !

    i do have a problem in building my  DWH , i will try to make my problem  simple !
    i have a table called "Sales Order Detail " :

    Sales_Detail (PK) | Sales Order (FK) | Product           | Qte | Prix

     1                                    1                    TV                    10      1000

    1                                     1                    CAR                  10      1000

    1                                     1                    PEN                  10      1000

    1                                     2                    HOUSE             10      1000

    1                                     2                    COMPUTER       10      1000

    1                                     3                    TV                     10      1000

    A table called Sales_Order

    Sales_Order_ID |  Customer_ID | Location ID |

    1                           1                         1

    2                           2                         1

    3                           1                          2

    i have another table called Sales_Order_Reason

    Sales Order | Sales Reason |Reason_Name

    1                        1                      Review               

    1                        2                   Quality

    1                        3                    Demo

    2                        2                 Quality

    2                        4                Television Ads

    2                        3                  Demo

    3                        2               Quality

    3                        1                   Review

    As you can see ! The reason is Relation to the order not to the ID ! is there a way i can link my Sales Order ID to the sales reason based on the order  in my fact table !

    Thursday, April 25, 2019 10:49 AM