Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Insert from Other Table?
Message
From
28/12/2000 11:42:09
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00457362
Message ID:
00457374
Views:
28
>Looking to steal any ideas for this problem:
>
>1. Have two tables with same structure in same DBC.
>2. One table has had a lot of SQL-Inserts, the other one not.
>3. Need to insert all of the values from the larger table to the smaller one, all within one SQL statement. Something like
>insert into smalltable (*) values (select * from bigtable where candkey not in (select candkey from smalltable)
>
> ?

It can't be done in one insert-sql in VFP; however, here's one quick way I've used before
use smalltable order candkey
append from bigtable ;
     for !indexseek(candkey, .f., "smalltable", "candkey")
Insanity: Doing the same thing over and over and expecting different results.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform