HOw to pass a table as input parameter to a user defined function

  • Hi,

     

    I wanna pass a table as input parameter to a user defined function. Is there anyway i can do it

     

    Thanks

    Ashihs

  • Nonscalar types such as cursor and table cannot be used as input parameters for user defined functions. See SQL Server Books Online (Create Function) for more information.

  • Can you describe a fbit more of what you need to do?  it is possible for you to reference a temp table from inside the udf...but you can't pass a temp table variable into a udf.

    steve

  • You might want to look into User-Defined Functions That Return a table Data Type.

    They might give you the functionality you're looking for.

     

     

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

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