• gary.strange-sqlconsumer - Wednesday, September 13, 2017 9:22 AM

    Thanks for your comment Eric. What's your opinion on the approach I prescribe here? I interpreted your comment as adding additional info but not really reflecting on the article.

    I was rather hoping for a little more engagement in the discussion forum from the community. Unusually quiet in here, people normally offer an opinion for or against, perhaps my piece wasn't provocative enough.

    I failed to ignite a debate 🙁

    Hi Gary,
    You presented the case well for applying the principal of single responsibility when developing T-SQL queries, views and stored procedures. The code performs better and is easier to unit test, because it only retrieves those columns are required by a specific case usage. At the same time it provides more opportunity for reusability. It's not an object oriented programming language, but the same design principles still apply.

    "Do not seek to follow in the footsteps of the wise. Instead, seek what they sought." - Matsuo Basho