销售订单和详细信息问题 [英] Sales Order and Detail Issue
问题描述
问候
我正在使用AdventureWorks DataBase我有3个桌子&b;
表1  ; :OrderSales(OrderSaleslID" PK",OrderDate,CustomerID)
I'm working with the AdventureWorks DataBase I do have 3 Tables
Table1 : OrderSales (OrderSaleslID "PK" , OrderDate , CustomerID )
表2:OrderSaleReason(OrderSaleslID" PK",SalesReason" PK")
Table 2 : OrderSaleReason (OrderSaleslID "PK" , SalesReason "PK")
表3:OrderSalesDetail (OrderSalesDetail ID" PK" OrderSaleslID" PK",ProductID,QTE)
我的事实表"销售额"基于OrderSalesDetail
Table 3 : OrderSalesDetail (OrderSalesDetail ID "PK" , OrderSaleslID "PK" , ProductID , QTE )
My fact table "Sales" is based on the OrderSalesDetail
FactSales(OrderSalesDetail ID" PK", OrderSaleslID ,ProductID,QTE Order,OrderDate,CustomerID)
FactSales (OrderSalesDetail ID "PK" , OrderSaleslID , ProductID , QTE Order , OrderDate , CustomerID)
我的问题是否有可能将SalesReason集成到我的事实表中而不创建另一个表或在我的事实表中有重复
PS:1个销售订单可以有很多销售原因
My Question is there a possibility to integrate the SalesReason in my fact table without creating another table or having a duplicate in my fact table
PS: 1 sale order can have many sales Reason
并谢谢!
and thanks!
推荐答案
嗨Ramyzo92,
Hi Ramyzo92,
您需要一个新的FactSales表替换,因为目前只有通过OrderSaleslID到OrderSaleReason的符号链接。
You would need a new, replacement to FactSales table as presently there is only a symbolic link to the OrderSaleReason via OrderSaleslID.
这篇关于销售订单和详细信息问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!