S
Sparky Arbuckle
I am building an app that is looking for the latest model of a
particular product. I am storing these results in a datalist. Below is
what the location and newest model fields look like:
Location - NewestModel
A1 - A
A1 - B
A2 - A
A3 - A
A3 - B
A3 - C
A4 - A
A5 - A
A5 - B
A5 - C
A5 - D
A5 - E
I know that I can do a SELECT MAX(NewestModel) to return the highest,
E, but it would defeat the purpose of what I am trying to do.
The output I am going for is:
A1 - B
A2 - A
A3 - C
A4 - A
A5 - E
This way the output shows what the latest version is at each location.
This is the way that the database is configured (it was like this when
I came on) so changing the layout and stored procedures is not an
option.
Any suggestions?
particular product. I am storing these results in a datalist. Below is
what the location and newest model fields look like:
Location - NewestModel
A1 - A
A1 - B
A2 - A
A3 - A
A3 - B
A3 - C
A4 - A
A5 - A
A5 - B
A5 - C
A5 - D
A5 - E
I know that I can do a SELECT MAX(NewestModel) to return the highest,
E, but it would defeat the purpose of what I am trying to do.
The output I am going for is:
A1 - B
A2 - A
A3 - C
A4 - A
A5 - E
This way the output shows what the latest version is at each location.
This is the way that the database is configured (it was like this when
I came on) so changing the layout and stored procedures is not an
option.
Any suggestions?