Link to home
Start Free TrialLog in
Avatar of ToddFields2
ToddFields2

asked on

How can you use a #temp table from one SSIS task in another task step?

Hi,

I'd like to create a #Temp table as part of join in a SQL statement in a OLE DB Source task step.  I keep getting an error as the # temp is not available at the time I build the new SQL OLE DB Source.  

I've tried ## temp tables and had no luck setting a SQL Task to use Full Result Set.

Any thoughts?

Thanks,
Todd
Avatar of brandonvmoore
brandonvmoore

Global temporary tables are deleted when all users referencing the table disconnect from Microsoft SQL Server.  I'm not sure if this is your problem or not.  Why not try using a regular table and deleting it manually?
Edit: of course, by manually I meant by manually adding a line of code to do it automatically...
Avatar of ToddFields2

ASKER

Hi,

Yeah, that is my option.  The issue would be that the table has to continue to exist (ie. I would truncate it and not drop it) so that the next OLE DB SQL would correctly compile.

Todd
ASKER CERTIFIED SOLUTION
Avatar of brandonvmoore
brandonvmoore

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial