how to call stored procedure from SSIS? -


i want create ssis package call stored procedure , dump output of procedure table.

ssis package return output , need resultset ouput dump table. before inserting want update rows tables if rows exist date or insert resultset.

i do't quite understand requirements way:

  1. drop on execute sql task

  2. ensure yourstagingtable exists , columns match stored procedure output

here sample code put in execute sql task want:

-- clear staging table truncate yourstagingtable  -- save results of stored proc staging table insert yourstagingtable exec yourproc  -- update existing records update yourfinaltable set yourupdatefield = yourstagingtable.yoursourcefield yourstagingtable yourfinaltable.joinfield1 = yourstagingtable.joinfield1  -- insert non existing records insert yourfinaltable (column1,column2) select column1,column2 yourstagingtable not exists (     select 1 yourfinaltable      yourfinaltable.joinfield1 = yourstagingtable.joinfield1     ) 

Comments

Popular posts from this blog

css - I want to align grid in center -

Contact Form PHP Email Script -

python - SWIG function not printing output -