Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Group By missing or invalid?
Message
From
29/11/2005 16:02:55
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01072942
Message ID:
01073009
Views:
24
>>>>I get the above message with the following sql statement:
>>>>
>>>>
>>>>  SELECT MAX(trackrcd.date), ALLTRIM(trackrcd.t_s_num) FROM trackrcd ;
>>>>	WHERE ALLTRIM(trackrcd.client_id) == thisform.idclient AND;
>>>>	ALLTRIM(trackrcd.prjt_num) == thisform.idproj AND ;
>>>>	ALLTRIM(trackrcd.task_num) == thisform.idtask ;
>>>>	INTO ARRAY datearray
>>>>
>>>>
>>>>Anyone know why? This is not a group by situation.
>>>
>>>It's not a GROUP BY but the same rule applies, only aggregate functions can be used.
>>>
>>>
SELECT MAX(trackrcd.date), MAX(ALLTRIM(trackrcd.t_s_num)) FROM trackrcd ;
>>
>>I need the specific trackrcd.t_s_num that belongs to the Max(date), so I don't think that will work.
>>
>>Thanks anyway.
>
>SELECT V.Date, X.t_s_num
>FROM
>(SELECT max(Date) as Date
>  FROM trackrd
>	where ...) V inner join TrackRd X on V.Date = X.Date
Thanks. I will try this out with my rewrite.
>
>This is from the top of my head...
>
Previous
Reply
Map
View

Click here to load this message in the networking platform