>SELECT INV (No index - 1906 records)
>SET ORDER TO INV_UNIQ (This is a unique index - 1870 records)
>
>SELECT INV_FN (Empty table with same structure as INV - 0 records)
>APPEND FROM INV (INV_FN now has 1906 records!!)
>
>Why is the APPEND FROM appending the entire INV table? How can I get this to work.
>
>Thanks.
Append From reads the table and doesn't even look at the indexes.
Try:
select distinct * from inv into cursor c_temp nofilter
select inv_fn
append from dbf('c_temp')
This may or may not work for you depending on what constitutes a unique/distinct record in your system. If it doesn't then you can always traverse the table with the unique index active and insert records manually into the new table.
use inv order inv_uniq
use inv_fn in 0
scan while !eof()
scatter memvar memo
insert into inv_fn from memvar
endscan
HTH.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao