January 12, 2009 at 2:28 am
hi,
I m very new to SSIS jobs.My requirement is I need to develop a SSIS package in sql server 2005 whcih does the following action
1.It first calls a stored procedure spDelete to delete certain rows from a table.
2.Then it should read a input file and for each input row it should call a stored procedure spInsert to insert the row.
Can any one help on this ??
January 12, 2009 at 6:35 am
in control flow add
1 execute sql task and
1 data flow task.
in execute sql task write ur procedure to delete some rows.
in data flow task add one data source and OLEDB command task.
in data source take ur data on which u need to apply the procedure.
in OLEDB command write ur procedure in the format
exec procedure_name ?,?,?,?
(here ? are the input parameters.. give as many ? as inputs)
January 19, 2009 at 6:06 am
Thanks....How can i read the inputs from a file...
The input file contains parameters which as to be passed to the stored procedure or inser statements.
The format of input file is
1 22 33 44 55
23 45 67 99 00
.
.
.
.
n
January 19, 2009 at 10:18 am
Does the spInsert stored procedure do anything except insert a row? Does it do any data cleansing or dupe checking?
You might be better off loading the file into a staging table on the same server as your target table. When the data flow task completes use an Execute SQL task to insert all of the new rows into the target table.
You could use an approach similar to this:
http://www.sqlservercentral.com/Forums/Topic639133-148-1.aspx
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply