Can anyone help me retrieve deleted data in Oracle SQL*Plus?
here are the two tables that the data has been deleted from.be informed that only data of current date (T_DT = 28-JUN-15') has been accidentally deleted and the sales center id (SC_CD) selected as 27.
SQL> desc targ_mas
Name Null? Type
------------------------------- -------- ----
SC_CD NOT NULL VARCHAR2(2)
FP_ID NOT NULL VARCHAR2(4)
T_DT NOT NULL DATE
T_PCT NUMBER(3)
T_TARG NUMBER(9,2)
FL_MVH NOT NULL VARCHAR2(1)
SQL>
SQL>
SQL> desc prod_targ
Name Null? Type
------------------------------- -------- ----
ASM_ID VARCHAR2(4)
RM_ID VARCHAR2(4)
FM_ID VARCHAR2(4)
FP_ID NOT NULL VARCHAR2(4)
SC_CD NOT NULL VARCHAR2(2)
TYP_CD NOT NULL VARCHAR2(2)
DIV_CD VARCHAR2(1)
CAT_CD NOT NULL VARCHAR2(2)
PRD_CD NOT NULL VARCHAR2(4)
T_DT NOT NULL DATE
QTY_TARG NUMBER(8,2)
T_VAL NUMBER(10,2)
TP_VAL NUMBER(9,2)
BR_CD VARCHAR2(3)
BS_CD VARCHAR2(4)
RMBS_CD VARCHAR2(2)
queries used to delete data from both tables :
delete from targ_mas
where sc_cd = '27'
and t_dt = '28-JUN-15'
delete from prod_targ
where sc_cd = '27'
and t_dt = '28-JUN-15'
thanks. Iftekhar
Aucun commentaire:
Enregistrer un commentaire