Select maintable SET ORDER TO mainkey &&Remeber that you need to have an index mainkey select modacad set relation to mainkey into maintable set skip to maintable && if mainkey is not unique in maintable replace maintable.mochk009 with mochk009 all set skip to set relation to Select maintable set order to <pre> Agnes >I would like to update a table based on values within the cursor. Each record in the table has a field called 'mainkey' and the same in the cursor. I have a field namely mochk009 in the table and in the cursor. Therefore when I modify the cursor I then want to modify the table. My syntax is: > ><PRE> >SCAN >replace modacad.mochk009 WITH result.mochk009 for result.mainkey=modacad.mainkey >ENDSCAN >>