Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Help
Message
From
02/08/2007 11:21:21
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01245144
Message ID:
01245502
Views:
26
>>
>>SELECT Id, Forename, Compname, SUM(OrdTotal) TotOrd ;
>>FROM clients LEFT JOIN Prsndetl ON Clients.Id = PrsnDetl.ClientId;
>>LEFT JOIN Orders ON Clients.Id = Orders.ClientId;
>>GROUP BY Clients.Id, Clients.Compname, PrsnDetl.Forename;
>>HAVING '01' $ LOWER(Clients.CompName) ;
>>OR 'hr' $ LOWER(PrsnDetl.Forename) ;
>>OR TotOrd = 300
>>
>
>Nice and simple. Do you think it's better than derived table? What is the difference in speed of execution?

It is faster because VFP
execute an on place filtering, respect to a filtering copy as derived table.

But remember that VFP don't optimize HAVING.
In this case it doesn't care because the OR Logic remove every optimizable way
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform