Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is wrong?
Message
 
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:
01018431
Views:
8
Not a good thread for this question :o)))

In your SELECT COUNT()... WHERE clause is wrong.
You use a Dlyatten (B) alias to filter records in (alias11) but there is no JOINs between them.
The easiest way to do this is to split this select to wo different select and play with them until you get what you want and the join the selects again:
SELECT COUNT(category="H") FROM (alias11) WHERE b.date=date .and. year(date) = thisform.text1.Value INTO CURSOR cTemp

*** This select must raise you an error because there is no B. defined
*** but as I sayd just make it work as you want 
*** then remove INTO CURSOR .... surround it with brackets  and copy and paste it into the first SELECT.
*** It is a good Idea to Give a name to that Name i.e (SELECT....) AS CategoryCount.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform