Home Forums SQL Server 7,2000 T-SQL Group by with MAX then other columns - how to control what is returned if there are multiple results RE: Group by with MAX then other columns - how to control what is returned if there are multiple results

  • ryan.mcatee (11/6/2012)


    There are probably many ways to do this, and I'm not sure this is the proper way, but this is how I do queries like this:

    That can help you, but it won't be great for performance.

    You're doing a triangular join and that's what some call "Hidden RBAR".

    Read the problems that this will cause in this article:

    http://www.sqlservercentral.com/articles/T-SQL/61539/

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2