Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL append from one table to another table
Message
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01041168
Message ID:
01041330
Views:
14
This message has been marked as the solution to the initial question of the thread.
>>>I have two identical tables and want to either merge them both into a new table, or append from one table to the other table. I have tried INSERT FROM TABLE, but can not get it to work. Also tried INSERT FROM ARRAY, but the two tables have their columns in slightly different order so copying to and from an array will not work.
>>>
>>
SELECT table1
>>APPEND FROM table2
>>
>
>I can not get the syntax correct. I have many tables to do and do not want to list each field and am hoping to use the table name directly and not have to use an alias - which means I would have to open the tables first.
>
>SELECT * FROM c:\rt50vss\data\siteparm.dbf APPEND FROM C:\RT50VSS\DATA\R36_SITEID\siteparm.dbf

You don't need select-sql.
...
USE c:\rt50vss\data\siteparm.dbf 
APPEND FROM C:\RT50VSS\DATA\R36_SITEID\siteparm.dbf
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform