new refactor suggestion

DanAvniDanAvni Posts: 72 Bronze 2
edited November 13, 2007 9:07AM in SQL Refactor Previous Versions
if i have a sproc that only does a select statement and returns a recordset, i would like to refactor like this:
move the select statement into a table returning function and change the sproc to do a select from the new function.
Dan Avni

Comments

  • Dan,

    We are thinking about an encapsulate as function which would cover both scalar and table returning functions. Would this cover your needs?

    Regards,

    Jonathan
    Jonathan Watts

    -Project Manager
    -Red Gate Software Ltd
  • DanAvniDanAvni Posts: 72 Bronze 2
    i think so. would this be as a context menu after i highlight the select function inside the sproc
    Dan Avni
  • As we are at a pre planning stage at the moment, I haven't a clue how we would present it. Developing a feature to use a context menus in SSMS isn't always as straight forward as one would at first believe.

    There would definately be menu option / keyboard shortcut of some description. I imagine we would base it on the encapsulate as stored procedure feature, to give you some idea.

    However, don't get your hopes too high. We are considering this feature, but whether it makes the cut hasn't been decided yet.

    Regards,

    Jonathan
    Jonathan Watts

    -Project Manager
    -Red Gate Software Ltd
  • I'll cast my vote for Encapsulate as Function. It would be even more valuable to me than Encapsulat as stored procedure.
Sign In or Register to comment.