0
我的表是這樣的:添加列 「以前日期」
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
你想'ALTER'表添加它,或者只是在查詢中返回列? – Patashu 2013-04-11 08:37:51