Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Conditional Insert
Message
De
29/10/2015 14:56:50
 
 
À
29/10/2015 14:54:40
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., Nouvelle Zélande
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01626580
Message ID:
01626654
Vues:
62
>Al,
>
>>>- you can inadvertently step on existing memvar values unless you carefully manage their names
>
>The variables in the function are passed by value so don't affect existing variables.
>
>>>- If you just have 2 possible INSERT statements, run the correct one via IF...ENDIF as you suggest
>
>>>- If you have a few of them, use DO CASE...
>
>In fact the question referred to field1 "or any other field" meaning that a single IF does not answer the posed question. In fact you're into mathematical permutation needing at least 8 CASEs to cover all the possibilities for 3 fields. Hence my solution that cheerfully copes even as the number of fields increases past 3 and the permutations rise into the hundreds.
>
>What was interesting here was an OP suggesting that somebody trying to help, ought to be "constructive." An unusual attitude in VFP. I'll be sure not to offer my useless suggestions to such a person again. ;-)

Maybe we should reach out to "RV Boy". He might have some good suggestions :)

Truthfully, there is no simple elegant approach for what Dmitry was looking for. Your suggestion is no better and no worse than anything I or anyone else can come up with, given the context of the question.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform