Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Component has no available input columns

$
0
0

I have a OLE DB Source and Flat File Destination in my DFT

SET NOCOUNT ON -- script to show if the FreeSpaceGB <= 1 GB for C: -- and <= 20GB for drives not equal to C: IF EXISTS (SELECT * FROM tempdb.dbo.sysobjects WHERE ID = OBJECT_ID('tempdb..#ServerName') ) DROP TABLE #ServerName SELECT DISTINCT servername into #ServerName FROM DiskFreeSpace IF EXISTS (SELECT * FROM tempdb.dbo.sysobjects WHERE ID = OBJECT_ID('tempdb..#DiskFreeSpaceT') ) DROP TABLE #DiskFreeSpaceT CREATE TABLE #DiskFreeSpaceT( [ServerName] [varchar](50), [DeviceID] [varchar](21), [SizeGB] [numeric](18, 2), [FreeSpaceGB] [numeric](18, 2), [InsertDate] [datetime] ) DECLARE @svrn char(25) WHILE exists (SELECT top 1 servername from #ServerName ) begin select @svrn = servername from #ServerName delete FROM #ServerName where servername = @svrn insert INTO #DiskFreeSpaceT SELECT ServerName,DeviceID,SizeGB,FreeSpaceGB,InsertDate from DiskFreeSpace where ServerName = @svrn and DeviceID = 'c:' and FreeSpaceGB <= 1.6 -- 1 and CONVERT(varchar(10),InsertDate,101) = CONVERT(varchar(10), GETDATE(),101) union ALL SELECT ServerName,DeviceID,SizeGB,FreeSpaceGB,InsertDate from DiskFreeSpace where ServerName = @svrn and DeviceID <> 'c:' and FreeSpaceGB <= 100 -- 20 and CONVERT(varchar(10),InsertDate,101) = CONVERT(varchar(10), GETDATE(),101) end SELECT ServerName,DeviceID,SizeGB,FreeSpaceGB,InsertDate from #DiskFreeSpaceT order by servername, DeviceID

My SQL Code In OLE DB Source is as follows and I am not able to see the columns in the Flat File Destination

Here is the image

The picture is too big but I hope it explains the point.

Thanks.


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>