Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
From a record of a table to another
Message
From
13/10/2007 08:28:01
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01260800
Message ID:
01260803
Views:
20
>I have two tables with the same structure, and I using the got below
>
>Scan table1
>
> select table 2
> appe blank
> ** if this record is not in table1 yet
> ** get data of this record to current record of table1
>endscan
>
>Is it possible to append data from a record of table1
>to a redord of table2 without having to store table1 fields to variables?
Use table2
append from table1 for yourcondition
If you want to add all records which are in table1 and not in table2, into table2, it's easier to find the missing records first
SELECT * FROM table2 WHERE uniqid NOT in (SELECT uniqid FROM table1) into cursor temp
Select table2
Append from dbf('temp')
You can do all this in one Insert command, but then you must list all the fields.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform