Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Number of Flocks SQL
Message
From
24/12/2007 18:51:42
 
 
To
24/12/2007 18:07:51
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01277395
Message ID:
01277401
Views:
11
probably just a type but shouldn't it be
GROUP BY flockyear,growercode
to get what you described?


>Never mind. I figured it out.
>
>
>SELECT growercode, flockyear, COUNT(fm_grcode) ;
>FROM ;
>(SELECT SUBSTR(fm_flcode,1,4) growercode, fm_grcode, YEAR(fm_hatchdate) flockyear ;
>FROM it!flckmast) fy ;
>GROUP BY growercode, flockyear ;
>INTO CURSOR curs1
>
>
>>Hi All:
>>
>>Given the following data:
>>
>>
>>Grower     Flock
>>Name       Began
>>
>>Grower1	1/4/07
>>Grower2	1/6/07
>>Grower1	3/4/07
>>Grower1	1/4/08
>>Grower2	1/6/08
>>Grower2	3/4/08
>>
>>
>>How would I be able to produce the following report?
>>
>>
>>Number of Flocks Report
>>
>>Grower    Number
>>
>>2007:
>>Grower1   2
>>Grower2   1
>>
>>2008:
>>Grower1   1
>>Grower2   2
>>
>>
>>Thanks,
>>
>>Yossi
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform