Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
APPEND FROM ignoring index?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00400920
Message ID:
00400923
Views:
15
>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()  && do not reset to top of file; follow the active index of inv
   scatter memvar memo
   insert into inv_fn from memvar
endscan
HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Reply
Map
View

Click here to load this message in the networking platform