Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is faster: insert from memvar or insert fields?
Message
De
24/07/2006 20:16:49
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
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
Database:
Visual FoxPro
Divers
Thread ID:
01139366
Message ID:
01139517
Vues:
21
>>Your SSN validation is inefficient
>>store (len(m.lcSSN) = 9) and ;
>>	EMPTY(CHRTRAN(m.lcSSN, "0123456789","")) and ;
>>	m.lcSSN <> "099999999" AND OCCURS(LEFT(m.lcSSN,1), m.lcSSN) < 9  ;
>>	to llSSNOK
>>return m.llSSNOK
>>
>
>Thanks. Is it the fastest algorithm here? I was just going to take a look and was thinking along the same lines.
>
>What do you think about age? Is there a simpler way to find person's age in years?

(val(dtoc(date(),1)) - val(dtoc(m.bDate),1))/10000

could be used for years.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform