Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Last 3 orders from each customer - sql puzzle
Message
From
25/09/1999 13:55:37
 
 
To
24/09/1999 23:16:07
Cindy Winegarden
Duke University Medical Center
Durham, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00268263
Message ID:
00268972
Views:
23
Actually, I glad you replied because now I don't have to go searching for this thread. I guess I was brain dead the other day and missed the obvious answer.

SELECT *
FROM orders INNER JOIN ordlines
orders.orderid = ordlines.orderid
WHERE orders.orderid IN (
SELECT TOP 3 orderid
FROM orders
ORDER BY orderdate DESC)

-Mike
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform