日期:2014-05-17 浏览次数:20952 次
SQL> SELECT * FROM TEST_DW; DWID STARTTIME ENDTIME AMOUNT ---------- ----------- ----------- ---------- 1 1/1/2008 1/4/2008 5 1 1/3/2008 1/6/2008 5 2 1/1/2008 1/4/2008 5 2 1/3/2008 1/6/2008 5 1 1/7/2008 1/12/2008 6 2 1/7/2008 1/11/2008 8 1 1/13/2008 1/16/2008 10 7 rows selected SQL> SELECT DWID, 2 AMOUNT, 3 DWID+AMOUNT "NEW_DWID" 4 FROM TEST_DW; DWID AMOUNT NEW_DWID ---------- ---------- ---------- 1 5 6 1 5 6 2 5 7 2 5 7 1 6 7 2 8 10 1 10 11 7 rows selected