• Practical example behind this article was following:

    I needed to share data among stored procedures because I had very complex task which required to pull data from fixed tables to some temporary structures and do some logic above them. I picked #table solution for sharing data because all others (output parameters, UDDT, ...) were not sufficient for my scenario. Then I've started to "encapsulate" this complex logic and realized that you cannot use #table with function. I made up synonym workaround at this point.

    At the end of a day I had to use process-keyed tables for data sharing because this workaround had very big maintenance drawback as described in article.

    Jakub Dvorak

    __________________________________________________________________________________________SQLTreeo.com - My Blog and Free SSMS Productivity Add-In