• durai nagarajan (11/19/2012)


    WHERE CONVERT(DATETIME, CONVERT(VARCHAR, @date, 101)) BETWEEN FromDate AND ToDate

    this is the code which is creating problem as its not using the index for search (if any ) , better to make the passed parameters according to the column compatible data. see this http://www.sqlusa.com/bestpractices/substring/

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)