Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Repeated records
Message
 
 
À
02/08/2007 03:04:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01245292
Message ID:
01245448
Vues:
24
>This is the easiest, and probably the best way to do this.
>
>Update yourtable set field1=data1, field2=data2,...;
>  where uniqfield1=uniqdata1 and uniqfield2=uniqdata2 and uniqfield3=uniqdata3
>if _tally=0 && No records found, so this is a new record
>  Insert into yourtable (field1, field2... , uniqfield1, uniqfield2, uniqfield3);
>    data (data1, data2, ... ,uniqdata1, uniqdata2, uniqdata3)
>endif
Looks like a good idea.

What if we work with buffered tables? We may still need a candidate index.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform