table type argument as OUTPUT in PROC

  • how can i define table type argument as OUTPUT in PROC and don't READONLY?

    if it's not possible, is there another way to do same this?

    thanks!

  • What are you trying to do?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • I want to pass a table variable into a procedure that has table argument as output, but not as read only! I want to be able to modify that argument inside the PROC. Is this possible? If it's not possible, is there another way to do this?

  • No, table-type parameters have to be read only.

    Declare a table variable inside the proc, insert the contents of the parameter into that and manipulate as you like. Or create a temp table outside, populate it and just refer to the temp table inside without any parameter at all.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply