Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is wrong?
Message
From
30/05/2005 07:09:14
 
 
General information
Forum:
Visual FoxPro
Category:
FRX2Any
Title:
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01018429
Message ID:
01018505
Views:
9
>Boris thanks for your helpful reply. i got require result. But slow...not very slow but slow.
>Is sum command use for Numaric data and count for character.??
>Christian Ehlscheid codes are with sum but when i apply i have .nul.

Khubaib,
I don't know what you want to do.
Did you want to COUNT() all records that match 'category="H"'?
Or you want to COUNT() these records that match 'category="H"' and some other conditions?
If you want to calsulate ALL records records that match 'category="H"':
SELECT  distinc b.date,b.code,b.category,;
        SUM(IIF(b.category="H",1,0) AS CntField;
FROM dlyatten B;
INTO CURSOR temp
m.nYear = thisform.text1.Value

SELECT  distinc b.date,b.code,b.category,;
        SUM(IIF(b.category="H" AND year(date)=m.nYear,1,0) AS CntField;
FROM dlyatten B;
INTO CURSOR temp
But as I said I don't know what you want to do. Check to see if some of these exaples will work for you.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform