Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why Two Different Return Counts
Message
From
11/09/2007 14:49:09
Erick Miranda
Formata Data Business - Grupo Linx
Contagem, Brazil
 
 
To
11/09/2007 14:24:46
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01253728
Message ID:
01253752
Views:
24
This message has been marked as the solution to the initial question of the thread.
Steven,

>I think my first sql ststement is where I have went wrong. I have a table with a cono field. Many records can have the same cono. I need a count of distinct cono's that have the archivef field set to '0'.
>
>What I think my current sql is giving is the total number of records with the same cono.
>
>SELECT Count(*) As rCount, cono FROM webprddt6.tsotagtbl Where archivef = '0' Group By cono

So, you can to try this:
Select count(*);
   From (SELECT Count(*) As rCount, cono FROM webprddt6.tsotagtbl;
            Where archivef = '0' Group By cono;
        ) myAlias
With this you will have the number of cono that has archivef field set to 0.
I hope this help.
Erick
Força Sempre!
Strength Always!
Previous
Reply
Map
View

Click here to load this message in the networking platform