• Arun's solution is how you would accomplish leaving colD unaggregated and in the query. However, it seems (from your requested output) like you only want 1 of colD, not all of them. In that case, you would need to figure out which colD you wanted. Wrapping colD in a MAX as well should give you the result set you requested. If you have more complex criteria for which colD to keep, you may need to use another derived table to process that.

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]