• meghna.bhargav (9/6/2013)


    Thanks Sean. and I agree to what you said as its important to make people understand what i am trying to communicate.

    With the issue, I think i have used what David have suggested directly in the SP but have not yet tested in Live so not sure how will it behave in terms of performance.

    Have a good weekend.

    Next time when I post issue or suggestion or anything, will definitely take this into account.

    Cheers

    Meghna

    You are quite welcome. The query could get kind a bit lengthy but the performance shouldn't be an issue. If you have a chance, post and back and let us know how it goes when you do get it live. It is nice to hear how our suggestions work on other systems.

    _______________________________________________________________

    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/