not clear on the requirement - if a user moves say the bottom record to the top - do you want just that record moved? i.e. break the grouping. Or both records (GroupID=3) to preserve the grouping? If the latter, you will need a second sequence column to sort on, rather than groupID