Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL GROUP BY with MEMO-Field in Fieldlist
Message
From
15/11/2013 11:58:55
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01587998
Message ID:
01588034
Views:
52
Thank you Naomi,

I tried your code and did not get an error any longer. But I get all records, no grouping occurs at the final result.

Any other idea?

TIA
Gerhard

>>Hello,
>>
>>I have a SQL Select that does not work. I get "Missing or illegal GROU BY Clause".
>>
>> SELECT F1, F2, F3, F4, F5 ;
>> FROM TAB1 ;
>> INTO TAB2 ;
>> ORDER BY F1, F2, F3, F4 ;
>> GROUP BY F1, F2, F3, F4
>>
>>F5 is a memofield. So I can not include it in the GROUP BY.
>>How can I have the result grouped by the rest of the fields?
>>
>>TIA
>>Gerhard
>
>Try
>
>select T.F1, T.F2, T.F3, T.F4, T.F5 FROM ;
>(select F1, F2, F3, F4 from Tab1 GROUP BY F1, F2, F3, F4) X ;
>INNER JOIN Tab1 T ON T.F1 = X.F1 AND T.F2 = X.F2 AND T.F3 = X.F3 AND T.F4 = X.F4 ;
>ORDER BY T.F1, T.F2, T.F3, T.F4
>
Gerhard Schmidbauer
URANUS Software GmbH
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform