Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Verification on IIF() in SQL clause
Message
 
 
À
16/03/2003 01:16:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00766260
Message ID:
00766275
Vues:
24
>So, this applies to UDF use only in SQL. Ok, that'd make sense I have it in an isolated place as I don't use that approach that much. However, it worked ok in VFP 7. So, I'd assume there's a different way of doing things now in regards to that specific point in VFP 8.

I ran a test in VFP7 and VFP8 and don't see any difference between them.
SELECT *, IIF(1=1, myudf(1,RECNO()), myudf(2,RECNO())) FROM test

FUNCTION myudf
LPARAMETERS par1, par2
STRTOFILE(TRANSFORM(par1)+ " " + TRANSFORM(par2) + CHR(13) + CHR(10), "z.z",1)
RETURN par1
* z.z file
1 1
1 1
2 1
1 1
1 2
1 3
The test table has 3 records. As you can see myudf was executed 3 extra times. So I'm puzzled why it did work in VFP7.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform