• Luis Cazares (12/10/2013)


    Lowell (12/10/2013)


    if you group by both EMPID and PrimaryRater, you don't get the "end Date" you were looking for according to your sample data, so im not sure if your expected results is incorrect, or there's more to the question

    Why not? It seems correct to me.

    Lius, it was his expected results that made me wonder: he said his expected results for one of the rows was this data:

    1234501/01/1966 B12345 07/17/1966

    , but since i grouped by PrimaryRater, and there's only one row, the min/max dates are teh same value (01/01/1966)

    that's why i thought either his expected results might be incorrect, or there's some biz rule not yet described, like 'if there's no [?date], use a different row?

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!