對空表ZDIA進行如下sql操作:
insert into ZDIA select substr(FSRQ,1,4)||'-'||substr(FSRQ,5,2)||'-'||substr(FSRQ,7,2) as QRZD, 'SUM' as YZYJ, '000000' as HPC, '0'
as ZBDJ, case when HEY in ('0','2') then YE*(-1) else YE end as YE, 0 as EFS, 0 as DEFS from RAW_ZDIA where FSRQ = '20191202' and DWHM='1003' order by SJYJ;
結果顯示成功且記錄數,但是查詢ZDIA 表為空。請問大神這是什么原因呢
uj5u.com熱心網友回復:
你是不是沒有提交?或者串庫了uj5u.com熱心網友回復:
在后邊加了commit也是一樣的,串表是什么意思,能具體說說嘛
uj5u.com熱心網友回復:
你在插入陳述句的同一會話查詢帶schema的該表試試uj5u.com熱心網友回復:
-- 用這個陳述句查一下,ZDIA 是不是臨時表。
select table_name, tablespace_name, temporary
from user_tables where table_name ='ZDIA'
uj5u.com熱心網友回復:
執行insert 陳述句,需要點擊commit 進行提交,才能查到資料轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/22928.html
標籤:開發
下一篇:重復安裝oracle資料恢復
