how to update a column based on the values of other columns?
IdNo RevId MinorRevId Status
789 A a ?
789 B b ?
890 0 a ?
890 0 b ?
890 1 b ?
status is the column used to find the latest Revision id, hence the rule is
for each Id,
Check RevId higher value ( Either B from A,B series or 1 from 0,1 series )* value may be in A,B... series or in 0,1... series
and
Check MinorRevId higher Value ( b from a,b)
and update the status to "Y" for tht record alone.
and for the other records need to updated as "N".
hence the above table will be
IdNo RevId MinorRevId Status
789 A a N
789 B b Y
890 0 a N
890 0 b N
890 1 b Y
For example in case a new entry comes,
IdNo RevId MinorRevId Status
789 A a N
789 B b N
789 B c Y
890 0 a N
890 0 b N
890 1 b Y
the contents should be modified as shown above..
Can someone tell me how to achieve this..
Thank you for your time!!