• Step 1 of dealing with digging yourself into a hole is to stop digging.

    Here is what I think your situation is.

    You have a procedure with some relatively complicated logic in it. The procedure uses a temp table and returns data from the temp table as the output data set.

    The first thing to ask is if the business logic needs to be in a procedure. Can you do the logic in SSIS as efficiently or better? If so, write the logic pf the procedure in SSIS.

    If you need to use a procedure for some reason, having a temp table can be a problem for SSIS because it cannot get column information at design time. To get around this, you can use a global temp table while designing and keep the table in a session that you do not close. You can even just create a stub version of your procedure that does nothing but select the column set:

    CREATE PROC MyProc

    AS

    SELECT 'A' AS Col1, 'B' AS Col2...

    This will allow you to have SSIS build the input and output columns (be very careful of data types).

    You can do what you are suggesting - just run an insert from a procedure, but I would avoid it especially in the way you are doing it. If you must do this, include the insert as part of the procedure (even if you need to wrap this procedure with another one).