I have a table called CAS_SRCO_STAT which has columns : CHG_ORD_REQ_NBR(NUMBER type column),SRCO_STAT_EFF_DATE
(DATE type column), SRCO_STAT_TY_NAME(VARCHAR2
type column)
CHG_ORD_REQ_NBR is the primary key for this table.SRCO_STAT_EFF_DATE gives the date and time when any status(given by SRCO_STAT_TY_NAME)is inserted into this table.i don't want multiple status to be inserted into this table with same date and time.
I found all such CHG_ORD_REQ_NBR from this table by using this query :
select CHG_ORD_REQ_NBR,SRCO_STAT_
EFF_DATE from CAS_SRCO_STAT where SRCO_STAT_TY_NAME in ('CHANGE ORDER COMPLETE','CO RECONCILED') group by CHG_ORD_REQ_NBR,SRCO_STAT_
EFF_DATE having count(*) > 1
Now i want to update srco_stat_eff_date by increasing the time by 1 sec for the rows which have status as ''CHANGE ORDER COMPLETE' and have the same date and time as the ones which have status as 'CO RECONCILED'
Start Free Trial