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

SSIS Script Task - Select Into Table Code

$
0
0

I'm trying to come up with a C# code on Script Task. My C# is not that great. What I'm trying to achieve looks like this in TSQL:

SELECT*INTO Server2.DatabaseNameXX.Sample.@MyTable

FROM Server1.DatabaseName.dbo.@MyTable

Please note that the Script Task will be inside a Foreach Loop Task and hence table name is a variable.

Can someone please kindly give me a sample C# code to address the above requirement. The sample code should include how I should handle the @MyTable variable as well as connection managers for the two servers.

Many thanks,


Mpumelelo


Viewing all articles
Browse latest Browse all 24688

Trending Articles



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