Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
No Duplicates
Message
De
05/05/2010 10:38:15
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
01462570
Message ID:
01463216
Vues:
24
>
>select crsTest && use the name of the cursor you created
>INDEX on fName TAG fName

>PRIVATE pnRec, pcName

>pnRec = -1
>pcName = crsTest.FName
>
>replace IDFld WITH IIF(crsTest.FName == m.pcName, NVL(_VFP.SetVar('pnRec', m.pnRec+1),1), ;
>NVL(_VFP.SetVar('pcName', crsTest.FName),1) * NVL(_VFP.SetVar('pnRec', 0),1)) * (m.pnRec + 1) IN crsTest NEXT 40
>
>&&browse
Ok lets see
select the table, set an index declare variables

Then you Replace the IDfield(the ton of Zeroes granted we didnt do the previous replace) with if and only if the test.fname=m.pcname.

NVL returns statement 2 if statement 1 is null.

so NVL(_VFP.setvar('pnRec',m.pnRec+1),1)= Setvar sets a variable to a value pnrec an pnrec+1 i would believe but if null 1 is returned?

NVL(_VFP.SetVar('pcName', crsTest.FName),1)=same as above mostly but different expressions for 1 and 2


* NVL(_VFP.SetVar('pnRec', 0),1)) * (m.pnRec + 1) IN crsTest NEXT 40= pnrec an 0 is the first expression and if null sis returned 1 is returned?
*(mpnrec+1) not too sure and also not sure about NEXT 40
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform