Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Question

Author  Topic 

sqlfresher2k7
Aged Yak Warrior

623 Posts

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

Please advise.

robvolk
Most Valuable Yak

15732 Posts

Posted - 2012-05-25 : 14:07:09
What business rules? Your question is extremely vague.
Go to Top of Page

sqlfresher2k7
Aged Yak Warrior

623 Posts

Posted - 2012-05-25 : 14:47:39
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

15732 Posts

Posted - 2012-05-25 : 14:56:40
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

52326 Posts

Posted - 2012-05-25 : 15:41:21
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

623 Posts

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

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-05-25 : 16:40:05
welcome

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

Go to Top of Page
   

- Advertisement -