Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Deleting and Inserting set of records based on Date Field

$
0
0

Hi Experts,

I am trying to update a table with last two weeks data on daily basis.

I first delete the last two weeks data based on a Date Field in the Table. For this I get the system datetime and do something like: 

Where Clause - > DateField = Getdate()-11 days.

While inserting, I do the same. However, the time lapse in the system date between the delete and insert is causing the data to lose.

I am quite new to these tasks. I appreciate if anyone could help me a step by step approach on how to do achieve my requirement.

Or any links to guide me will help.

Thanks heaps in advance.


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>