• the whole sp cannot be posted as there are many joins

    to get the result & check i prepared 3 different SPs with conditions as stated above

    SP1 contains @dt1 & @dt2 date passed

    SP2 contains @dt3 & @dt4 date passed

    SP3 contains @dt1 & @dt2 & @dt3 & @dt4 date passed with where clause as stated by you

    when SP1 & SP2 are executed i get the proper results

    but if i executue the SP with case in where clause i get no records

    individually in SP1 i get 13 records

    SP2 i get 6 records