Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why Two Different Return Counts
Message
From
11/09/2007 13:32:00
Erick Miranda
Formata Data Business - Grupo Linx
Contagem, Brazil
 
 
To
11/09/2007 13:24:19
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:
01253734
Views:
14
Hi Steven,

>Why would to two following SQL statements return different record counts?
>
>sqla = "SELECT Count(*) As rCount FROM webprddt6.tsotagtbl Where archivef = '0' Group By cono"
>
>sql = "SELECT cono, archivef FROM webprddt6.tsotagtbl Where archivef = '0' Group By cono, archivef"
>
>The first returns 128
>
>The second 133
>

Because of the Group By clause. There are two different Group By clause. First is "Group By cono" and second is "Group By cono, archivef" and it that can to return different count.
Erick
Força Sempre!
Strength Always!
Previous
Reply
Map
View

Click here to load this message in the networking platform