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.
| Author |
Topic |
|
ARC_kly
Starting Member
1 Post |
Posted - 2012-02-06 : 08:03:59
|
| Hi all,Please suggest me what will be best way to processing 1000000 records in following logic..Begin Loop on Master Table Posting on Transaction File Begin Loop on Detail Table Posting on Transaction File LoopLoop---------------------------------------------------Posting Procedure on Transaction FileIf record not exits in Transaction File Begin Insert New Record EndElse Begin Update Same records End- RegrdsA Roy Chowdhury |
|
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
Posted - 2012-02-06 : 08:06:57
|
| More likely than not, the most efficient way to do this would be to do a set-based query that updates all the records, perhaps in a transaction, with appropriate exception handling etc.If you post the table DDL, some sample output data and expected results, there are several people on this forum who would be able to advise you with more specifics. Take a look at Brett's blog here for some guidance on how to post all of that info: http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx |
 |
|
|
|
|
|