Recursive queries - get the top N quantity

  • steve-lauzon (4/13/2010)


    Holy smokes !

    Thanks a lot guys... you've just saved me a bunch of time - just the solution I was searching for

    The "Holy smokes" is adequate... this routine that Jeff has ironed out can be wicked fast.

    Glad it works for you... note that when we can get all the information and table structures / test data to work with, someone here can usually get an answer for you.

    Can't wait for the day that I'll be able to give such advice to newbies like me

    Thanks for your help

    A+

    It's been just a few short years that I was in this same situation. This is an excellent place to learn... hang out here as much as you can, and as you start to learn things (like this), don't be timid in answering others questions. That is how you learn.

    Also, what Jeff said about that article he wrote. It is VITAL that you follow those rules, or you should just do this another way. Additionally, do not ever just grab code off of any site and throw it into production. If you don't understand it, don't use it. Ask questions here if you need to...we'll help you. But don't use it until you do understand it.

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

  • Also, what Jeff said about that article he wrote. It is VITAL that you follow those rules, or you should just do this another way. Additionally, do not ever just grab code off of any site and throw it into production. If you don't understand it, don't use it. Ask questions here if you need to...we'll help you. But don't use it until you do understand it.

    I'll do... you are absolutely right!

    Thanks

Viewing 2 posts - 16 through 16 (of 16 total)

You must be logged in to reply to this topic. Login to reply