Then I have stored procedure that has 2 datetime parameters, RefStartDate - RefEndDate.
Now I have to extract from PlantHistory table only the record that has at least one second of the fields PlantStartDate and PlantEndDate "inside" my RefStartDate and RefEndDate parameters.