• taigovinda (8/2/2013)


    Good point... For the sample data that is definitely smarter. In my actual data I have about 6 fields that are like 'address' in that there could be multiple distinct values and I only want to pick one - I suppose I could put min() for each one but that would probably be more expensive, right?

    Careful... if you put MIN on each column, you could end up having Detroit in California. 😉

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)