我有这样的表:
PartNr、ProductionSite、ProductionType、PODate、PoPrice、PoCurrency
前三列定义了独特的产品。我想做的是再添加一列与以前的采购订单日期,以使价格有效的日期范围。这是示例:
PartNr.... Site.... Type.... Date
111111 BBBBB 100 2008-06-10
111111 BBBBB 100 2012-01-18
111111 BBBBB 100 2012-01-30
111111 AAAAA 100 2008-06-10
111111 AAAAA 100 2012-01-18
111111 AAAAA 100 2012-01-30
我想得到这个
PartNr.... Site .... Type .... Date .... Added Column
111111 BBBBB 100 2008-06-10 ... 0
111111 BBBBB 100 2012-01-18 ... 2008-06-10
111111 BBBBB 100 2012-01-30 ... 2012-01-18
111111 AAAAA 100 2008-06-10 ... 0
111111 AAAAA 100 2012-01-18 ... 2008-06-10
111111 AAAAA 100 2012-01-30 ... 2012-01-18