I'm using SQL Server 2008 R2 and how can I execute a select query with a execute stored procedure?
Executing stored procedure in select query
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Dipankar BiswasRank #992 · 2K reputationPosted Aug 27, 2014, 6:39 AM EDT
Pradeep ShetRank #595 · 4K reputationPosted Sep 1, 2014, 11:07 PM EDT
There are different ways like
EXEC spName
sp_executeSql spName
Hope this answers your query.
Mark it as answered if it is so
Jignesh TrivediRank #16 · 50.3K reputationPosted Sep 1, 2014, 11:40 PM EDT
Hi,
As per the my knowledge you cannot use Store procedure with select query/ statement.
you can use function instead of stored procedure...
hope this will help you.