SQl query similar to access last() function (1 Viewer)

ntanh72

New member
Local time
Today, 01:25
Joined
Nov 16, 2009
Messages
7
Pls help.

I am trying to find a way to get the code similar to last() function in access. I got a table recording prices of different items (autonumber, item name, item price) and need some thing to get the last price for each item.

All I can do now is to build a 2 steps:
1- Get Max autonumber for each item
2- Get Price @ the Max autonumber of step 1

Thanks.
 

HiTechCoach

Well-known member
Local time
Today, 03:25
Joined
Mar 6, 2006
Messages
4,357
Pls help.

I am trying to find a way to get the code similar to last() function in access. I got a table recording prices of different items (autonumber, item name, item price) and need some thing to get the last price for each item.

All I can do now is to build a 2 steps:
1- Get Max autonumber for each item
2- Get Price @ the Max autonumber of step 1

Thanks.

What last() function are your referring to?

This may also help:

Get Information Associated with the Most Recent Entry From a Table
 

Vassago

Former Staff Turned AWF Retiree
Local time
Today, 04:25
Joined
Dec 26, 2002
Messages
4,748
Unfortunately, SQL doesn't have a last function. Your solution and the one HiTech posted are the best.
 

Users who are viewing this thread

Top Bottom