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 |
|
cipriani1984
Constraint Violating Yak Guru
304 Posts |
Posted - 2011-10-05 : 05:36:58
|
| Hi,I have the following information:AccNum, StatementDate, Amount, etc etc etcThis is a big query which is then loaded into a staging table, my goal is to reduce the load time, as I want to avoid loading the entire data everytime and only processing what I havent loaded already.Is there a way I can use the statementdate and run my SP to look at the last statement date and load based on that?Thanks |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-10-05 : 05:42:09
|
| yep. you can use MERGE statement for this based on statementdate------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
cipriani1984
Constraint Violating Yak Guru
304 Posts |
Posted - 2011-10-05 : 06:16:59
|
hi Any chance you can show me an example? Im quite new to mergeThanks :)quote: Originally posted by visakh16 yep. you can use MERGE statement for this based on statementdate------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/
|
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
|
|
|
|