>I have a problem, and don't know if it is a known bug, or misinterpretation.
>
>Here's what I want... Update a field for all records in a first table with the value of a field in a matching table with the same id.
>
>Ex:
>
>Update table1;
> set txtfield1 = table2.txtfield1;
> where table1.keyid = table2.keyid
>
>
>Here's the scenario to test with
>Create two tables with a keyid and txtfield1
>add 5 records to each with ID in each table set from 1-5
>in table 1, set the values = a,b,c,d,e
>in table 2, set the values = z,y,x,w,u
>
>If table 2 is currently on record 3 (item = x), only record 3 in table 1 (item = c) will be changed to the new value (item = x).
>
>I want the results to become
>1 = z
>2 = y
>3 = x
>4 = w
>5 = u
>
>I know that you can use views, but the process of work is being held in interim work tables that may require a full system update at a later time. Therefore, updateable views won't work for us.
>
>Any help would be greatly appreciated...
That's exactly how update SQL would work and nothing wrong there. It doesn't move pointer in table2 only in table1. You should change it to :
select table2
scan
Update table1;
set txtfield1 = table2.txtfield1;
where table1.keyid = table2.keyid
endscan
Cetin