table name: test below are the columns and records Terminal VIN Loadnum FOH ROH Date 60 A 1 38 48 20120103 60 B 1 38 48 20120103 60 C 1 38 48 20120103 60 D 1 32 48 20120103 60 E 1 38 40 20120103 60 F 2 30 35 20120103 60 G 2 30 35 20120103 60 H 2 30 35 20120103 60 I 2 30 32 20120103 60 J 2 30 35 20120103 like this i have number of records, if you look at load number 1, it contains 5 records. in that 5 records FOH should be 38 assumption, but it has one record 32. i need that record as an output. and every load contains different FOH and ROh
tsql
Managed Windows Shared Hosting by OrcsWeb