Home Forums SQL Server 7,2000 T-SQL T-SQL standard way to get current and previous rate situation RE: T-SQL standard way to get current and previous rate situation

  • Ahh, I see what you're saying now: you worded your post easlier as if to say that LAG was returning multiple results, which it is not. You mean you want to limit your result set to one row. 🙂

    Use TOP 1, and ORDER BY (sorting by your End_date in descending order).

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk