Hi,
Your script will look like this in case param3 ou param4 are null
Hope that help
Bechir.
SELECT TABLE1.*, TABLE2.*
FROM TABLE1
INNER JOIN TABLE2 ON TABLE1.ELEM1 = TABLE2.PARAM1
AND TABLE1.ELEM2 = TABLE2.PARAM2
WHERE TABLE1.ELEM3 BETWEEN ISNULL(TABLE2.PARAM3, TABLE1.ELEM3) AND ISNULL(TABLE2.PARAM4, TABLE1.ELEM3)