• kk.86manu (12/7/2012)


    Thanks for your reply

    I just have one more clarification

    IF '12/07/2012'<'12/01/2013'

    For the mentioned condition the first value is the same and second value is greater and again the condition should not satisfy

    In this case how the comparison will occur.After the first string is compared will it compare the next 2 strings?

    Are you looking at those string values as dates or strings? As soon, and as told earlier, SQL will look at those as strings unless you convert them to dates using the CONVERT function. As strings, '12/07/2012' < '12/01/2013' is false. If you sort them as strings it would look like this:

    '12/01/2013'

    '12/07/2012'