0

Hi I have a stored procedure and I would like to use its output as an input table. Tried something like this but it is not working

 SELECT 
      ...
 FROM 
      (SELECT CALL Recommend('input');)

How would I be able to use it as my input?

Stivan
  • 1,128
  • 1
  • 15
  • 24
Tenebris
  • 83
  • 6
  • http://stackoverflow.com/questions/1492411/sql-server-select-from-stored-procedure – Dresden May 24 '16 at 17:16
  • @Dresden - Question is tagged with `Mysql` – Pரதீப் May 24 '16 at 17:23
  • I was just mentioning it because of the use of views or a user-defined function over using the output of a stored proc, not really because it was a perfect duplicate of the question being asked. Sorry, I should have added more to my response. – Dresden May 24 '16 at 17:49
  • It's not possible that way. You can/have to use a temporary table. – Solarflare May 24 '16 at 19:24
  • or better yet not a temporary table, but rather a worktable with a session id returned from the first stored proc (OUT param or from result set) and the use of a control table. It is faster and avoids DDL slow downs @Solarflare . It would support concurrency with multiple users doing it at once – Drew Jun 20 '16 at 12:12

0 Answers0