• isuckatsql (10/4/2013)


    Sean, you make a lot of suggestions about all the things i am doing wrong, yet offer nothing helpful.

    This is a discussion forum, so we discuss things, if you don't want to help then don't, but it serves no purpose to turn it into a pi**ing contest.

    Sean, since you offer no value to this discussion, i suggest you move along 🙂

    Actually I was trying to point out that you were being given some advice and were defiantly ignoring that advice and defending the code that caused you to post here in the first place. In direct opposition to your assumption that I don't want to help, the very reason I posted is because I do want to help. Trust me I don't need to post on a forum to make myself feel good. I did in fact offer something that would be helpful if you would drop the attitude and read what I wrote. The biggest performance issue by far in your query is the "catch all" code. I posted a link to what is widely considered the best article on the topic.

    I sincerely hope you are able to figure out a solution to your problem. You will however be doing it without my help because you have asked me to not assist you. Best of luck.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/