MattBaldry
Self Taught, Learn from the Forums
- Local time
- Today, 18:31
- Joined
- Feb 5, 2019
- Messages
- 365
Thanks Maj,I thought I covered this already, but yes you can.
I am assuming that the Tran_Num is always increasing. So if I have records in my destination table and records to be imported from my source table then the tran_Num to import are those in the source greater then the max Tran_Num in the destination.
1. Get the destination Max Tran_Num. "Max_Tran_Num"
2. Get the count of source records greater than Destination max Tran_Num. "Number of Records to Import"
3. Divide the count of records by 10 or some other percent. Lets call that the "Increment" = "Number of records to Import" /10.
4. Then loop from 1 to 10
"Select Top Increment from Source where Tran_Num > Max_Tran_Num"
Import records into destination
Get new "Max_Tran_Num" from destination
update your progress meter
loop
I have never coded a loop before but I will find some codes and give it a go.
~Matt