UPDATE statement for copying from one column to another in same table
Posted on 2006-03-30
I have a table which tracks how a task is moving from one approver's queue to another.I have these columns.
RTE_IDFR, RTE_SEQ_NBR , DATE_ASGN, RTE_ACTN_DATE, DATE_AVBL.
for1st aprover RTE_SEQ_NBR will be 1 for 2nd one 2 so on.RTE_IDFR, DATE_ASGN will be same for all approvers of one task.
I want to update date_avbl for 1st approver to be DATE_ASGN and for all subsequent approvers DATE_AVBL should be updated to RTE_ACTN_DATE of previous approver.I have correct RTE_ACTN_DATE for whole table but DATE_AVBL column is all messed up and hence i want this update.
Column descriptions :
RTE_IDFR NOT NULL NUMBER(10)
RTE_SEQ_NBR NOT NULL NUMBER(5)
DATE_ASGN NOT NULL DATE