~~~ 從 Xuite 搬過來 ~~~
-- TABLE 備份
CREATE TABLE SREV.TERR_000614
AS
SELECT * FROM SREV.TERR
;
-- 確認資料已確實備份
SELECT COUNT(*) FROM SREV.TERR_000614
SELECT COUNT(*) FROM SREV.TERR;
-- 移除原 TABLE
DROP TABLE SREV.TERR;
COMMIT;
-- 將資料重新轉入
INSERT INTO SREV.TERR
(
PCODE,TDATE,BHNO,DSEQ,SALE,
EMNO,KTIME,KTYPE,FSOL,
AMT_CALC,AMT_ERR,ECNT,MEMO,
EMNO_UPD,SYTIME
)
SELECT
PCODE,TDATE,BHNO,DSEQ,SALE,
EMNO,KTIME,KTYPE,FSOL,
AMT_CALC,AMT_ERR,ECNT,MEMO,
EMNO_UPD,SYTIME
FROM SREV.TERR_000614
;