Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Group by error
Message
From
23/06/2003 14:10:17
 
 
To
23/06/2003 12:23:03
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00802887
Message ID:
00803011
Views:
12
Thanks, thats about what I do now thanks to Cetin.
Its alot faster


Thanks

>Hi Peter,
>
>this can be faster
>
>
>SELECT ;
>	pitype_id,;
>	MAX(expdate);
>	FROM PI ;
>        WHERE eqtype_id=2 AND equip_id=2246 ;
>	GROUP BY 1;
>  INTO CURSOR Result
>
>SELECT ;
>	a.pi_id,;
>	a.pitype_id,;
>	a.expdate ;
>	FROM Result b JOIN PI a ON a.pitype_id = b.pitype_id ;
>	   and a.expdate = b.expdate ;
>   INTO CURSOR Result
>
>
>If you have defined index, with SCAN and INSERT you can give the result
>on fraction time of these select, because VFP not use index in grouping and order select.
>
>Fabio
Peter Cortiel
Previous
Reply
Map
View

Click here to load this message in the networking platform