Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
Data Warehousing
»
Integration Services
»
Need to implement the Business rule row by...
Need to implement the Business rule row by row
Rate Topic
Display Mode
Topic Options
Author
Message
Saravanan_tvr
Saravanan_tvr
Posted Monday, September 10, 2012 10:14 PM
SSC Veteran
Group: General Forum Members
Last Login: Thursday, April 25, 2013 7:04 AM
Points: 269,
Visits: 1,110
Hi,
How can we agonize,Row by row like cursor in SSIS, what controls will be using,
Here am reading data from excel , now I want to apply all client business logic's one row at a time, once completed i want to move second row..
Please let me know how can i perform.. ?
Many Thanks!
S.saravanan
“I am a slow walker, but I never walk backwards-
Abraham Lincoln”
Post #1357127
Mackers
Mackers
Posted Wednesday, September 12, 2012 1:52 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Tuesday, May 21, 2013 3:16 AM
Points: 117,
Visits: 459
What sort of thing are you trying to do? Depending on the size row by row updates could be slow
I guess you have a few options but I think if the business logic is complicated I'd be tempted to dump the data into a staging table then run a stored proc
The other option would be to use a script component in the data flow
If the logic is simple (eg first three characters of a column) then I guess you could use a derived column in SSIS or a slow option could be puting a SQL function on the import table
Mack
Post #1357826
Saravanan_tvr
Saravanan_tvr
Posted Wednesday, September 12, 2012 4:30 AM
SSC Veteran
Group: General Forum Members
Last Login: Thursday, April 25, 2013 7:04 AM
Points: 269,
Visits: 1,110
Yes, I decided to make as Sp and calling directly from Import tool...
Many Thanks!
S.saravanan
“I am a slow walker, but I never walk backwards-
Abraham Lincoln”
Post #1357880
Jeff Moden
Jeff Moden
Posted Wednesday, September 12, 2012 8:42 PM
SSC-Dedicated
Group: General Forum Members
Last Login: Yesterday @ 7:51 PM
Points: 32,910,
Visits: 26,800
Saravanan_tvr (9/10/2012)
now I want to apply all client business logic's one row at a time, once completed i want to move second row..
Yes, I decided to make as Sp and calling directly from Import tool...
Did you end up using somme form of loop for this? If so, this is going to be much slower than writing a set based validation routine. Why are you insisting on the use of RBAR?
--Jeff Moden
"
RBAR
is pronounced "ree-bar" and is a "Modenism" for "
R
ow-
B
y-
A
gonizing-
R
ow".
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Post #1358305
Saravanan_tvr
Saravanan_tvr
Posted Thursday, September 13, 2012 10:56 PM
SSC Veteran
Group: General Forum Members
Last Login: Thursday, April 25, 2013 7:04 AM
Points: 269,
Visits: 1,110
Yes, We have a cross validations with 10 Master table then Update and Insertions based on the Logic. from excel one row at a time. as per the client requirements ..
Many Thanks!
S.saravanan
“I am a slow walker, but I never walk backwards-
Abraham Lincoln”
Post #1359041
Sean Lange
Sean Lange
Posted Friday, September 14, 2012 8:00 AM
SSCrazy Eights
Group: General Forum Members
Last Login: Yesterday @ 2:33 PM
Points: 8,620,
Visits: 8,261
Saravanan_tvr (9/13/2012)
Yes, We have a cross validations with 10 Master table then Update and Insertions based on the Logic. from excel one row at a time. as per the client requirements ..
That does not sound like a reason to this RBAR. You can do all that using MERGE and OUTPUT.
_______________________________________________________________
Need help? Help us help you.
Read the article at
http://www.sqlservercentral.com/articles/Best+Practices/61537/
for best practices on asking questions.
Need to split a string? Try Jeff Moden's
splitter
.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Post #1359296
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.