dbTalk Databases Forums  

enforcing business rules while transferring

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss enforcing business rules while transferring in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
J-T
 
Posts: n/a

Default enforcing business rules while transferring - 06-10-2005 , 12:04 PM






I have a CSV file which I'm trnsferring its content to a table with
follwoing feilds:

1)ClientID
2)EmailAddress
3)AddressDescription
4)Primary

there could be multiple address for each client ,but each client **MUST**
have atleast one address with "Primary" flag set to "Y" (which mean that one
is his Primary address) and also one of the addresses **Must** also contain
an EmailAddress.Right now I am using a datapump task to pump data from CSV
into the Table.How and where can I enforce this business Ruls?

Thanks a lot




Reply With Quote
  #2  
Old   
Jon Choy
 
Posts: n/a

Default Re: enforcing business rules while transferring - 06-10-2005 , 04:26 PM






Use two tasks
DataPump -> Temp Table, no rules, on success continue to
Temp Table -> Destination Table, only things which pass the rules (now
that you can perform SQL set operations instead of being limited to
ActiveX script equivalents of cursor operations)

Then you can also have a task which scans the temp table for errors and
does something intelligent (exception report, drop on the floor [1],
whatever)

[1] - discard silently, commonly used in packet forwarding ruleset
discussions


Reply With Quote
  #3  
Old   
J-T
 
Posts: n/a

Default Re: enforcing business rules while transferring - 06-13-2005 , 12:08 PM



What you have described is exactly what I am doin,my problem is in the
second part .When I transfer everything to the temp table .I don;t know
which task should I use to implement the bizrules.
Thanks
"Jon Choy" <jchoy (AT) sgccomputer (DOT) com> wrote

Quote:
Use two tasks
DataPump -> Temp Table, no rules, on success continue to
Temp Table -> Destination Table, only things which pass the rules (now
that you can perform SQL set operations instead of being limited to
ActiveX script equivalents of cursor operations)

Then you can also have a task which scans the temp table for errors and
does something intelligent (exception report, drop on the floor [1],
whatever)

[1] - discard silently, commonly used in packet forwarding ruleset
discussions




Reply With Quote
  #4  
Old   
Jon Choy
 
Posts: n/a

Default Re: enforcing business rules while transferring - 06-17-2005 , 01:22 PM



ExecuteSQL would be my thought for this, using stored procedures to
query your temp table out into error tables, or into updates / inserts
into the "live" database tables.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.