Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GROUP BY on expression
Message
 
 
To
10/04/2003 08:58:32
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00775899
Message ID:
00775985
Views:
15
>>Your conclusion is incorrect because SQL Server doesn't work the way you described. The Query Optimizer analyzes whole query and decides how execute it. As I mentioned in the previous message ( I guess you missed it) Recent article in SQL Server magazine showed that this select generates the same execution plan as your query.
>
>Ok, adding the temporary cursor name does it. I also put the entire syntax that I need and that works great:
>
>
>SQLExec(lnHandle,'SELECT Year,Month FROM (SELECT YEAR(AddDate) AS Year,'+;
> 'MONTH(AddDate) AS Month FROM News) Temp GROUP BY Year,Month')
>
I'm glad you got it to work. It's unfortunate that VFP doesn't support derived tables so you could use the same queries for both backends.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform