Tuesday, August 2, 2011

Sql server Integration Service


using the ssis(sql server integration service) we can easily intergrate the sql table with a excel sheet
sql table is source and excel sheet is destination

by running the new ssis import export wizard we can easily create the ssis integration project
in this it will automatically create the excel file in your specified path and it will be integrating with that file

problem in this is if we are again running the integration project means it will show erroror it
will create duplicate data in the destination excel for that we can add a script task before all the things and

we can write the code to delete the existing excel file so that our ssis project  wil be working smoothly


in C# we have a class for manipulating all the file operations ..


  System.IO.File

you can write the code like this in the script task



if(System.IO.File.Exist("path\filename.xls"))
{
   System.IO.File.Delete("path\filename.xls");
}

No comments:

Post a Comment