>just replacing is not going to work. i am trying to select a certain field because i have to use data from that record to insert into another table. then i want to update the table i have selected from. really what i am trying to do is select for a certain customer id that meets certain conditions. then insert information in that table that for the customer. update the record i was just looking at. go to another table to insert some information. then finally go back to and repeat the loop for the next record that meets the condition. that is why i am trying to select * from table where customerid = id and...... i realize that my initial thread was a little confusing. thanks for the help.
It looks like SCAN should work for you in this case
select a_alias
SET ORDER TO
SCAN
IF field1 = variable1 and field2 < 0
...
REPLACE field1 WITH variable2, field2 with newnumber ;
FOR field1 = variable1
ENDIF
ENDSCAN
--sb--