Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update and insert if _tall = 0
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Update and insert if _tall = 0
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01620194
Message ID:
01620194
Vues:
75
Hi all,

normally I would do a seek on a table that has a 2 field index, if I find the entry I update a field, if not I create a new record.
I was thinking about changing this to an update command, but wondering if there are any issues, speed mainly, with this.
update table1 set field3 = "some data" where field1 = "ABC" and field2 = "DEF"
if _tally = 0
    insert into table1 (...) values(...)
endif
it doesn't seem to slow things down as against a seek but I'm wondering if this is the dont thing.
the reason I would like to move to an update command is to modify code to be more like .net and sql which we're migrating to.

~M
Go raibh maith agat

~M
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform