• weisietan (11/18/2011)


    I try using the sql server 2000 to retrieve date using Between

    the first data will counted but the last will not counted.

    Example:

    Name between 'A%' and 'C%'

    just will get the A & B data only..

    so ...the answer i think no so correct ...

    According to MSDN, the behaviour of BETWEEN and DATETIME is exactly the same as in later versions, meaning that the boundaries of the BETWEEN are included in the result set.

    Your example also uses a string datatype, and not dates.

    http://msdn.microsoft.com/en-us/library/aa258277(v=SQL.80).aspx

    http://msdn.microsoft.com/en-us/library/aa225976(v=SQL.80).aspx

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP