Question:
I’m trying to get something like this to work. How can I take the output of a stored procedure and use it in a subquery?
create procedure pcore asselect e_id from emails where e_id like ("%1%")create procedure pevalasselect e_id from emailswhere e_id in(execute pcore)
Answer:
The way to accomplish your task is to create a temp table with the same structure as the result set from your stored procedure. Then execute an insert into #temptable:
( exec pcore)
You can then use your temp table in your subquery.
Charlie has over a decade of experience in website administration and technology management. As the site admin, he oversees all technical aspects of running a high-traffic online platform, ensuring optimal performance, security, and user experience.























