select GroupHeading, min(PKField) ; from WorkListXMLCursor ; into cursor keepers ; group by GroupHeading update WorkListXMLCursor ; set GroupHeading = "" ; where PKField not in ( select PKField from keepers )>I'm trying to only keep the first unique value of the GroupHeading field, blanking all others like it until I get to a different value. The code below is kicking out of the DO WHILE because the value of GroupHeading is changed by the REPLACE. I understand why, but how can I get around it?.