Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3977430
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T04:55:22+00:00 2026-05-20T04:55:22+00:00

I am calling one function using dynamic SQL query which accepts TVP. Is there

  • 0

I am calling one function using dynamic SQL query which accepts TVP. Is there any way to pass table values parameter in dynamic sql. One thing I can do to achieve this is to pass comma separated string and then convert this comma separated string to table. But the problem is then I have to convert string – table for each item in my table (The function is called for all the rows) which can be avoided if I can pass table in dynamic sql.

Thanks
Ashwani

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T04:55:22+00:00Added an answer on May 20, 2026 at 4:55 am

    Certainly. Where inputTable is your TVP type and @test is the variable:

    exec sp_executesql
     N'select
        t.*
       from @test as t
       where t.ID = 2'
    ,N'@test inputTable readonly' -- note the readonly
    ,@test
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Calling all C macro gurus... Is there any way to write a C macro
I have a c++ program which performs one function. It loads a large data-file
When calling php via cli, the current directory is NOT changed to the one
WPF, Browserlike app. I got one page containing a ListView. After calling a PageFunction
Calling Validate() on an XmlDocument requires passing in a ValidationEventHandler delegate. That event function
When calling DirectoryInfo.GetDirectories(.) on an instance of a DirectoryInfo class which points to a
when calling a SSIS package (C# app) using LoadFromSqlServer, does the user account have
What is the difference of calling function like: testCall: function() and function testCall() in
Here's my problem: I have an unmanaged dll that I made.I'm calling one of
ok now i am using the SQL database to get the values from different

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.