Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Assistance needed
Message
From
30/11/2001 00:31:17
 
 
To
29/11/2001 07:25:00
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00587400
Message ID:
00587845
Views:
29
One note: the Having is like the when if no there are a When clause CFP uses Having (thats what I know)
>Select Master.PriName as Name, Count(*) as Total ;
>From Tran, Master ;
>Into Cursor C_GraphData ;
>Where Tran.PriCode = Master.PriCode ;
>Group By Tran.PriCode ;
>Having Between(Tran.DatesOn,dDateFrom,dDateUpTo)

Try the folowing:

Select Master.PriName as Name, Tran.Pricode as Code, Count(*) as Total ;
From Master Inner Join Tran On Tran.PriCode = Master.PriCode ;
Into Cursor C_graphdata ;
Where Between(Tran.DatesOn,dDateFrom,dDateUpTo) ;
Group By Tran.PriCode ;
Order By TRan.Pricode

I hope this help

Mauricio
Be fast like the Fox
Be free like the Penguin
Se Rápido como el Zorro
Se libre como el Pingüino
Previous
Reply
Map
View

Click here to load this message in the networking platform