The following code deletes all rows in a filter, or range, for a rowset:

r = queryname.rowset

r.setRange( insert value here )

// delete all rows that match the range:

if r.first()

  do

     r.delete()

  until r.endofset

endif