Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Group by missing or invalid - strangeness
Message
From
12/10/2007 14:54:49
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
12/10/2007 14:51:17
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01260687
Message ID:
01260695
Views:
11
This message has been marked as a message which has helped to the initial question of the thread.
>>>Hi All,
>>>
>>>I have code in the aftercolchange method to set data up. Now I have a select that use to work, and is now, not working. It is Friday, I know, and I want to go home, so I can not see the problem with this select statement. I do not want to group the results. I am only looking at the first set of data returned.
>>>
>>>
>>>  SELECT client_id, MAX(act_time) FROM sup_act ;
>>>    WHERE client_id = lcclientid AND problem_id = lcproblemid ;
>>>    INTO ARRAY latemp
>>>
>>>
>>>I do not see where group by has any thing to do with the statement. Help!
>>>
>>>TIA
>>>Beth
>>
>>Because of the max(), all records are implicitly grouped into a single record.
>>
>>Perhaps you mean:
>>
>>... group by client_id - to get the max for every client.
>
>I want the max time for the client and problem id that match the criteria in the where statement.

In that case you don't strictly need to include field client_id, since you already have it in a variable. It is this field which causes the GROUP BY invalid message.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform