Jeff Kring (3/3/2010)
I did look into ROW_NUMBER as an option. I could use it to return the correct rows, but the application needs the actual value as well.
I don't understand what you refer to as "actual value". Please elaborate.
The best way would be to provide ddl and sample data for two sample table including expected result so we have something to play with.