Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can this be done in one SQL Select?
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00984864
Message ID:
00984927
Views:
34
Hi Dmitry,

A little changed Peter's suggestion.
(not tested too, sorry)
select ot.KEYFIELD, ot.CUST_ID, ot.ORD_DATE, ot.ORD_TIME ;
from ORDERTABLE ot;
where KEYFIELD =
	(select top 1 KEYFIELD from ORDERTABLE sot
	where sot.CUST_ID == ot.CUST_ID
	order by sot.ORD_DATE, sot.ORD_TIME descending where sot.ORD_DATE=yourDate)
order by CUSTOMER
Regards,
Venelina Jordanova

Outsourcing IT Services Ltd.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform