Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to clear out the contents of a View
Message
De
21/01/2005 09:27:21
Mike Yearwood
Toronto, Ontario, Canada
 
 
À
20/01/2005 16:57:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
00978872
Message ID:
00979243
Vues:
18
Hi Colin

Is there a product ID or something unique in each record? If so, index the view on that unique ID. You could use that index to update the view with data from the csv. Select the matching records from the CSV, update the view. Then select the unmatching records from the csv, append them into the view. You might even want to delete records from the view that are not in the csv. Then after all of that issue a single tableupdate.

That should result in the table matching the csv. If you need to reduce the number of updates, you could check if something in the csv is different from the view.

select * from csv where csv.ID = view.ID and (csv.price <> view.price OR csv.description <> view.description)

HTH
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform