Query Help Again...

  • Thread starter Thread starter Gary B
  • Start date Start date
G

Gary B

Can anyone help make this more efficient:

SELECT Orders.OrdersKey, (Select Top 1 OrdersHistory.OrderStatus From
OrdersHistory where OrdersHistory.OrdersKey = Orders.OrdersKey Order By
OrdersHistoryKey DESC) AS LastStatus
FROM Orders

-------------------------------------------------

Table Orders
- OrdersKey (PK)
- OrderDate
- etc.

Table OrdersHistory
- OrdersHistoryKey (PK-AutoNumber)
- OrdersKey (FK)
- OrderStatus
 
What "does not work" about that link? I just clicked on it and was taken to
the page.
 
Try to express yourself clealy and precisely ...

"...doesn't work ..." doesn't give any info. for other people to analyze the
problem.

I am not even sure whether you cannot access the link or you tried the
techniques in the link and couldn't get your query / SQL String to work.

Either way, you should have re-posted to the original thread so that I and
other know can reply accordingly rather than re-posting the same info.

Basically, you wasted your time and my time by not following the correct
protocal / procedure in communicating through newsgroups. Perhaps, you
should read:

http://www.mvps.org/access/netiquette.htm

to learn how to use these newsgroups efficiently.
 
This is the second time you left this link that does not work!

gary

And this is the fourth time you've posted this reply. Please see Van's
reply in this thread. The website is there, and it works just fine -
perhaps you might try just typing it in to your browser window rather
than clicking it, if you're having trouble getting a live link.

John W. Vinson[MVP]
 
Back
Top