Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
INSERT and UPDATE Usage
Message
De
04/09/2008 08:08:35
 
 
À
04/09/2008 07:13:52
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
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 SP2
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01344701
Message ID:
01344773
Vues:
17
You're welcome. I use this solution myself very often.

>I have used UPDATE so seldom. I had no idea it returned a _TALLY variable. This will work perfectly. Thanks!
>
>>
>>Update yourfile set x=Y where z
>>if _tally=0 && No match found
>>   Insert into yourfile ...
>>endif
>>
>>>I have a scenario where I need to INSERT into a table, but only if the record does not already exist. If it does exist, then I want to UPDATE it. There are a couple key fields that I can use to do the matching. I have a table open in the current workarea, and some of the values from the current record are what get inserted/updated in the 2nd table that is open. What would be the best way to handle that?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform