I have a scenario where I need to execute stored procedure in inline query and store their output into Temp(Temporary) table and then further filters onto that Temp table , depending upon the requirements.
The examples I have seen are like, creating a #Temp table with all columns definitions, but I don't want to define each and every column for the temporary table, rather dynamically creation as per SP output.
Can anybody guide me how to do that?