• J Livingston SQL (4/6/2016)


    Ed Wagner (4/6/2016)


    Alan.B (4/6/2016)


    Luis Cazares (4/6/2016)


    Ed Wagner (4/6/2016)


    Iwas Bornready (4/6/2016)


    This is great. I didn't know this simple trick.

    This is a QOTD that's 3 1/2 years old.

    And this functionality is no longer guaranteed to work as the ORDER BY will be ignored when using TOP 100 PERCENT.

    Ed.. 3 1/2 year? Its from 2008, I haven't had any coffee so I can't tell you how long ago that was but I suspect it was longer than 3 1/2 years.

    To Luis' point - for a presentation ORDER BY in a view (which I do sometimes just for testing) I do a TOP (1000000000000) which will not be ignored (nor does it affect the cardinality estimation when the optimizer create's a query plan).

    Yeah, you're right. I looked at the "more recent" comment from 2012 to determine 3 1/2 years. It's actually 8 1/4 years old. Answering 8+ year-old questions must be a hobby or something just to clutter up the "Recent Posts" page. It's kind of like spam.

    Points: 6,708, Visits: 662 "bragging rights" me thinks

    You're probably right. It's not the usual "Thanks for the question" or "Thanks for the article" but almost. At least the spam isn't as frequent as the weekend spam about watching sporting events online.