>Sample data >EDP SVC PVC DATE >23733 10.12 15.12 2008-12-01 00:00:00.000 >23733 12.12 0.00 2008-12-02 00:00:00.000 >25555 100.12 111.12 2008-12-02 00:00:00.000 > >Expected result: >23733 12.12 15.12 2008-12-02 00:00:00.000 >25555 100.12 111.12 2008-12-02 00:00:00.000 > >>The bottom line is when there are multiple records for one EDP I would like the PVC and SVC be taken from the max(date) UNLESS the value of either PVC or SVC is zero then I want the latest none zero value.