Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Salesforce
  3. Question
Salesforce

How to return the value from a query with SP_EXECUTESQL in a stored procedure?

Asked by Ankur Vaish Jul 12, 2021 2.2K views 1 answer
Share

About this question

 I have a stored procedure that generated a query string and then executes it with EXECUTE SP_EXECUTESQL @Query The query, e.g., is Select Name, Age from the table, so very simple. But how to get the result set back from the SP_EXECUTESQL (into a variable?) and then return it as result set in my stored procedure?


Your answer

1 Answer

More Salesforce discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Salesforce Blogs

Guides, tips and career advice on Salesforce from JanBask experts.