Need to perform Action based on what Select returns


i new ssis background in programming asp.net , basic select, insert, update sql skills.

i have execute sql task in ssis package select 2 tables. ie:

select name, address, id tablea, tableb where tablea.id = tableb.id , tablea.city = tableb.city 

if there match based on select criteria have 1-infinite rows returned. if there no match select return no rows. need know how check if select returns rows , if need perform 2 actions. using returned rows insert table export row(s) excel database.

since intent "do something" each row - insert/update them table and/or export them, not use execute sql task this.  use data flow task instead.

pushing data object type variable, extracting later use cumbersome.  use ole db source run statement.  you'll rowset out.  can use row count component count rows control whether send email or other notification in subsequent task.  send rows ole db destination insert or ole db command update.  use multicast duplicate flow send rows excel destination if wish.  if there no rows, no updates or inserts occur.  (a blank excel file generated, however.)


todd mcdermid's blog talk me on


SQL Server  >  SQL Server Integration Services



Comments

Popular posts from this blog

Conditional formatting a graph vertical axis in SSRS 2012 charts

Register with Power BI failed

SQL server replication error Cannot find the dbo or user defined function........