Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Help
Message
 
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:
01245151
Views:
31
The derived table is created first, right? In other words, we need to select everything from the original table and then would be able to apply conditions.

Thanks.

>You can use result of the query as derived table
>
>SELECT * FROM ( ;
>	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 ) dt1 ;
>  WHERE '01' $ CompName ;
>			OR 'hr' $ LOWER(Forename) ;
>			OR TotOrd = 300
>
>for another wrapping query.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform