1
即時嘗試合併到表中。合併成匹配woron
這個選擇犯規找到什麼:
select * from dpr where dpr_qot_id=1111;
然後我運行該合併像follwing:
MERGE INTO dpr d
USING (select dpr_ts, dpr_qot_id
from dpr
where dpr_qot_id = 1111
and dpr_ts = to_date('30.11.1999', 'DD.MM.YYYY')) s
on (s.dpr_ts = d.dpr_ts and s.dpr_qot_id = d.dpr_qot_id)
when not matched then
insert
(DPR_TS,
DPR_CLOSE,
DPR_OPEN,
DPR_HIGH,
DPR_LOW,
DPR_VOLUME,
DPR_QOT_ID)
values
(to_date('30.11.2010', 'DD.MM.YYYY'),
21.66,
21.75,
22.005,
21.66,
2556.00,
1111)
WHEN MATCHED THEN
UPDATE
set DPR_CLOSE = 21.66,
DPR_OPEN = 21.75,
DPR_HIGH = 22.005,
DPR_LOW = 21.66,
DPR_VOLUME = 2556.00;
,仍然選擇這種沒有找到任何東西:
select * from dpr where dpr_qot_id=1111;
我究竟做錯了什麼?
謝謝!
問候 瑪格達
你確定你的合併被提交嗎? – 2011-03-30 15:36:24
如果您有其他問題,請隨時打開另一個問題。 – 2011-04-01 06:38:52