• Iggy (11/13/2008)


    Nice! I almost got tricked. If you had put

    1 Test Policy 150000.00

    2 Policy1 250000.00

    3 0.00

    in the answer, I would have chosen it, but because this answer doesn't exist, it makes me re-read the query again carefully and noticed that the INSERT is actually part of the stored procedure. :hehe:

    I would have fallen into the same boat you would have.

    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