I have two tables with 1 to many relation my_table_1 and my_table_2 which are related by my_field_1. Sometimes I need to add new revision were I create new record in my_table_1, but I want to rename the related records in my_table_2 so they will connect to the new record in my_table_1. I tried to use the code below but after one record the scan loop is terminated. Does anybody have idea how to do this.
**************** Add revition to mytable_2
SELECT my_table_2
SET FILTER TO my_table_2='???'
SCAN
my_table_2.my_field_1="my_field_1_rev"
ENDSCAN
**************** Add revition to mytable_2
SELECT my_table_2
SET FILTER TO my_table_2='???'
SCAN
my_table_2.my_field_1="my_field_1_rev"
ENDSCAN