x

Run SSIS package on condition

Hi guys

I have a SSIS package that manually gets run daily. It inserts transactions from one database server to another.

How do i setup 2 date variables, based on the Max date in the Source transactions table and destination table. If the max date in the Source table is > than the max date in the destination table then insert transactions, else don't run the package.

Thanks

more ▼

asked Oct 28, 2013 at 08:57 AM in Default

avatar image

ruancra
1.2k 31 37 45

(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

The above problem can be solved using the Execute Package task option available in the control flow toolbox of SSIS.

For that, create a parent .dtsx package. Have a Execute SQL task, that will take care of your condition as mentioned in the requirement. If requirement yields positive, run the Execute Package task, that will call your currently working package. Using variables, customize the precedence constraint to use the expression and constraint as per your requirement.

more ▼

answered Oct 28, 2013 at 11:50 AM

avatar image

nidheesh.r.pillai
9.5k 23 59 49

Thanks Nideesh.

Do you have a link that will explain by example comparing 2 date variables before running a package?

Oct 28, 2013 at 12:12 PM ruancra

Sure. See the figure illustration as given in this link http://technet.microsoft.com/en-us/library/ms140153.aspx

Also you can refer the section "Defining Workflow by Expressions" in this link https://www.simple-talk.com/sql/ssis/working-with-precedence-constraints-in-sql-server-integration-services/

Oct 28, 2013 at 12:20 PM nidheesh.r.pillai
(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x1208
x775
x87
x0

asked: Oct 28, 2013 at 08:57 AM

Seen: 1779 times

Last Updated: Oct 28, 2013 at 12:20 PM

Copyright 2017 Redgate Software. Privacy Policy