General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Hi Michael,
Thanks for pursuit of the nested sql for this. I can't yet see a way.
Your code did something interesting, when I ran
SELECT TOP 3 order_id;
FROM orders;
ORDER BY order_date DESC;
INTO CURSOR top3
I got 5 records! Go figure.
The second Select with the nested sql did run when I assumed your example used orditems (you had ordlines). But I have no need for the line detail, just the last 3 orders.
Be that as it may, the results were not in three's. They match with top3, however.
SELECT *;
FROM orders INNER JOIN orditems;
ON orders.order_id = orditems.order_id;
WHERE orders.order_id IN;
(SELECT order_id FROM top3)
-Sylvia
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only