Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Insert from Other Table?
Message
De
28/12/2000 11:42:09
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00457362
Message ID:
00457374
Vues:
29
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform