• todd.ayers (5/22/2013)


    Well,

    I have finally had a chance to test this and I keep getting an error message saying:

    Msg 102, Level 15, State 1, Line 53

    Incorrect syntax near ')'.

    I don't see anything wrong with the code though

    I get the same error message if I comment out the last line of the query:

    Msg 102, Level 15, State 1, Line 53

    Incorrect syntax near ')'.

    ๐Ÿ˜‰

    โ€œWrite the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.โ€ - Gail Shaw

    For fast, accurate and documented assistance in answering your questions, please read this article.
    Understanding and using APPLY, (I) and (II) Paul White
    Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden