Need to retrieve a data row that having minimum sum of 4 red squared values.
i Have done a SP ,but seems to be it was wrong.
select * select * from SMST as p where p.Source=@Source AND p.Destination=@Destination OR p.Destination2=@Destination AND [Count]=(Select MIN(sourceRoadCount+middleroadcount+destinationroadcount+x1destinationroad2count as [Count]) from SMST )
Source and Destination will be given by user on a win form.
sourceRoadCount+middleroadcount+destinationroadcount+x1destinationroad2count are the 4 field that i want to get minimum sum valu.