Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Count null value
Message
De
27/01/2009 15:21:04
 
 
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 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01377290
Message ID:
01377493
Vues:
21
>>>Hi all,
>>>How can I count the fields with .NULL value?
>>>Im using an sql with "'count" but always getting the result 0.
>>>thanks
>>
>>
>>SELECT COUNT(*) as countnotnull
>>,   COUNT(NVL(NULLABLEFIELD,.T.)) as countnullalso;
>>,   COUNT(ICASE(ISNULL(NULLABLEFIELD),.T.)) AS countnullonly     FROM ...
>>
>
>Incorrect.

sorry, a typo.
SELECT COUNT(NULLABLEFIELD) as countnotnull
,   COUNT(NVL(NULLABLEFIELD,.T.)) as countnullalso;
,   COUNT(ICASE(ISNULL(NULLABLEFIELD),.T.)) AS countnullonly     FROM ...
>
>>
>>SELECT COUNT(*) as countAll
>>,   COUNT(NVL(NULLABLEFIELD,.T.)) as countnullalso;
>>,   COUNT(ICASE(ISNULL(NULLABLEFIELD),.T.)) AS countnullonly     FROM ...
>>
>
>See http://forums.asp.net/p/1374351/2890690.aspx#2890690
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform