Subselect ?
Posted in 2000
I have a table Steps as below stepID integer stepVersion decimal(9,3) TestID integer TestVersion decimal(9,3) ... if the table is populated with the following:- 1,0.001,1,0.001 2,0.001,1,0.001 3,0.001,1,0.001 4,0.001,1,0.001 2,0.002,1,0.002 Then you note that the last entry is for step 2 version 0.002 of test 1 version 0.002 What I want to do is to retrieve all of the steps for a given test and test version, that include ONLY the latest version of steps. For instance querying for Test 1 version 0.001 should return 1,0.001,1,0.001 2,0.001,1,0.001 3,0.001,1,0.001 4,0.001,1,0.001 but querying for Test1 version 0.002 should return 1,0.001,1,0.001 2,0.002,1,0.002 3,0.001,1,0.001 4,0.001,1,0.001 Any help would be apreciated. Neil. Sent via Deja.com http://www.deja.com/ Before you buy.