[thelist] Version Strategy (ASP)

Rob Smith rob.smith at THERMON.com
Wed Jan 7 13:04:22 CST 2004

Hi Listeroo's:

I'm looking at different strategies for getting the last version of a
collection of objects and am seeking your advice. Take:

Item ID	Item Name	Version
1		ABC		1
2		ABC		2
3		ABC		3
4		DEF		1
5		GHI		1
6		GHI		2
7		ABC		4
8		DEF		2
9		DEF		3

What I want as a returned record set is

ItemID	Item Name	Version
7		ABC		4
9		DEF		3
6		GHI		2

The straight forward approach would be to get a list of distinct projects:
ABC, DEF, GHI. The traverse all items by each name and get the last version
of each one. My initial thoughts lead me to a multidimensional array, but
there HAS to be an easier way to do this. (After a long day of coding, I
tend not to think straight anymore.) 

Is there some kind of query that'll do this for me in one move?

Rob Smith 

More information about the thelist mailing list