Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BUG: COUNT(ICASE(exp,) without eOtherwiseResult!
Message
 
 
À
16/04/2005 17:29:55
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
Divers
Thread ID:
01005497
Message ID:
01005503
Vues:
24
Fabio,

It looks like a bug to me too.
Another observation. According to ICASE() help the following 2 statements are similar but the second one generates an error. They both generate an error w/o COUNT()
SELECT COUNT(ICASE(.F.,1)) FROM RUNROWS INTO CURSOR c2
SELECT COUNT(ICASE(.F.,1, Null)) FROM RUNROWS INTO CURSOR c2
>Expected: same result
>
>Observed: when eOtherwiseResult is absent,
>VFP return a Table of 1.
>
>CLEAR
>
>CREATE CURSOR RUNROWS (F1 L)
>FOR K=1 TO 500
>	APPEND BLANK
>NEXT
>? "ICASE(.T.,1,NULL)=ICASE(.T.,1)",ICASE(.T.,1,NULL)=ICASE(.T.,1)
>SYS(3054,12)
>SELECT COUNT(ICASE(.T.,1,NULL)) FROM RUNROWS
>? _TALLY
>SELECT COUNT(ICASE(.T.,1)) FROM RUNROWS
>? _TALLY
>SYS(3054,0)
>
>
>Of course this bug is present on all the grouping functions:
>
>MIN(),MAX()
>SUM(),AVG() important !!!
>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform