How to pass table variable data into a data flow in ssis

I wrote a code like this in execute sql task

Declare @tmpHistoricDriveSpace Table 
( Servername varchar(255), MachineName varchar(255), Drive char(2), FreeSpace_MB int) 
insert into @tmpHistoricDriveSpace (Drive, FreeSpace_MB) exec xp_fixeddrives

update @tmpHistoricDriveSpace 
set Servername = convert(varchar(225), 
SERVERPROPERTY('servername')),   
MachineName = convert(varchar(225), SERVERPROPERTY('MachineName'))

Select MachineName, Servername, Drive, Freespace_MB 
from @tmpHistoricDriveSpace

This looks good but I am unable to carry this result into data flow task in SSIS which I am using to populate into a table.

  • What is the preferred format to store date/times in a SQL Server database when PHP is your primary language?
  • SQL Server 2008 R2 import from access fails on datetime column
  • Pessimistic locking in EF code first
  • Adding a further group into a recursive CTE
  • SQL - Similarity between two strings of varying length
  • SQL ESCAPE with multiple LIKE conditions
  • I am not liking the idea of creating a temp table on master database or just creating a new database for this task alone.

    Any help is much appreciated.

    Thanks

    Please refer this link for previous discussion

    One Solution collect form web for “How to pass table variable data into a data flow in ssis”

    Instead of writing the code in execute sql task why can’t you write it in OLE DB Source directly.

    Thanks,
    Santhosh

    MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.