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.
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.
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.