• It looks like you are swaping the Variable and the columns

    Based on your parameter and expected result.....

    Declare

    @DatumOd SmallDateTime

    ,@DatumDo SmallDateTime

    Select

    @DatumOd='20021201'

    ,@DatumDo='20021231'

    Select *

    From #T1

    Where

    ( @DatumOD >= Datod And @DatumOD <= Datdo )

    And

    ( @DatumDo >= Datod And @DatumDo <= Datdo )