• i am trying to explain it here

    example:

    ID pcondition scondition

    1 HF NULL

    1 CA NULL

    1 CF NULL

    2 CA NULL

    2 AST NULL

    the order for updating data is

    1 HF,

    2 CA

    3 CF

    4 AST

    if for particular ID ( ID 1)

    WE HAVE 3 pcondition, HF,CA,CF

    based on order ,here HF will be pcondition and CA and CF WILL MOVE TO scondition

    for ID(2), WE have CA,AST

    Based on order among 4 condition,whiever comes first will be primary

    so for ID(2) CA will be pcondition and AST will move to scondition

    result

    ID pcondition scondition

    1 PF NULL

    1 NULL CA

    1 null CF

    2 CA NULL

    2 NULL AST

    thanks