Passing a table variable to a multiline table-valued function

  • I am trying to pass a table variable into a multiline table-valued function, and SQL doesn't seem to like it. How can I pass a table variable? Or can I?

    Thanks for any insight anyone can provide!

  • You can't pass table variables into functions or sprocs.

    BOL:

    "The nonscalar types cursor and table cannot be specified as a parameter data type in either Transact-SQL or CLR functions.

    "

  • You can't pass a table variable, but you can pass an XML variable. Pretty easy to set up.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

Viewing 3 posts - 1 through 2 (of 2 total)

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