>>Please excuse this NEWBIE question, because I am sure the answer is very simple, but i cannot for the life of me figure out how to do this:
>>
>>How does one copy all the records from one VFP6 table into another identicaly structured table??
If the two tables have the same field names, you could:
USE (cTargetDBF)
APPEND FROM (cSourceDbf)This will work regardless of the order of fields in the table. If the fiedls occur in the same order with the same types, but with different field names, you could:
USE (cSourceDBF)
COPY TO TEMP.TXT TYPE SDF
USE (cTargetDBF)
APPEND FROM TEMP.TXT TYPE SDF
ERASE TEMP.TXTIf you needed to reorder/rename fields, you could do a SQL Select from the source table to an intermediate table or cursor to rename/reorder the fields, and then do an
APPEND FROM the cursor/table created by the SQL Select.
There are literally dozens of approaches available to do the same thing...
>>
>>I have tried the Copy and Append commands, but I must be getting my syntex wrong because I get error, and HELP has been useless so far.
>>
>>TIA,
>>Dan
>
>PS. Also, how is the best way for one to copy all records from a FPW database
>into an identically structured (well, the fields are the same types, etc) to
>a VFP6 table in a Database??
>
>Thanks Again,
>Dan