SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Question
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sqlfresher2k7
Aged Yak Warrior

584 Posts

Posted - 05/25/2012 :  14:04:41  Show Profile  Reply with Quote
I would like to implement the business rules in ssis without call a stored procedure.

Please advise.

robvolk
Most Valuable Yak

USA
15566 Posts

Posted - 05/25/2012 :  14:07:09  Show Profile  Visit robvolk's Homepage  Reply with Quote
What business rules? Your question is extremely vague.
Go to Top of Page

sqlfresher2k7
Aged Yak Warrior

584 Posts

Posted - 05/25/2012 :  14:47:39  Show Profile  Reply with Quote
Here are few example of B rules..

1. Update records the in the destination table if it exists in the destination table else create the new record.
2. The student name is required.
3. The student must be a child of one of the defined in the master table.
4. Some data conversions logic.
Go to Top of Page

robvolk
Most Valuable Yak

USA
15566 Posts

Posted - 05/25/2012 :  14:56:40  Show Profile  Visit robvolk's Homepage  Reply with Quote
I wouldn't call those "business rules", they sound mostly like data integrity rules. You can do 1 through 3 in SQL Server easily, and in fact you should have constraints to guarantee 2 and 3. Number 4 is possible in SQL Server depending on how elaborate the conversion is.

These could also be done in SSIS, I'm not an expert on it but I know you can do lookups and conditional logic to support 1-3, and is well suited for number 4.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
48012 Posts

Posted - 05/25/2012 :  15:41:21  Show Profile  Reply with Quote
quote:
Originally posted by sqlfresher2k7

Here are few example of B rules..

1. Update records the in the destination table if it exists in the destination table else create the new record.
AS suggested by Rob you can use lookup for this
see logic in below link

http://www.sqlis.com/sqlis/post/Get-all-from-Table-A-that-isnt-in-Table-B.aspx


2. The student name is required.
use conditional task with an expression to check if studentname has a valid value

3. The student must be a child of one of the defined in the master table.
again a lookup onto master table on related field
4. Some data conversions logic.
use derived column or data conversion transform


see options inline above



------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

sqlfresher2k7
Aged Yak Warrior

584 Posts

Posted - 05/25/2012 :  16:31:14  Show Profile  Reply with Quote
Thanks a lot Rob/visakh
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
48012 Posts

Posted - 05/25/2012 :  16:40:05  Show Profile  Reply with Quote
welcome

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000