Process not looping though all records

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
JHew
Posts: 27
Joined: Thu Jun 25, 2020 12:23 pm

Process not looping though all records

Post by JHew »

I have the following process that runs each morning to take the records from a SQL persisted database and transfer them to an AwareIM one. The database is around 2500 rows and has around 20 columns.

In the past couple of week the process seems to be randomly stopping without updating all the records. E.g. there will be 2500 rows in the SQL database but after the process has run there will only be 2140 that have loaded in to the AwareIM database. The data set I’m using is clean and has no duplicate values that could potentially confuse the process and weirdly if I run the process again manually, it will complete to the full amount of records.

Does anyone know why this might be happening or how I can troubleshoot this issue?

Thanks.


Process 1

Code: Select all

FIND ALL INFO1
CreateRecordsINFO1
Sub Process
Step 1. Find all the records where the primary key matches

Code: Select all

FIND Main_Planning_Data WHERE Main_Planning_Data.MPD_ID=INFO1.EKANBANid


Step 2. If it doesnt find it, create a new record

Code: Select all

If SEARCH_COUNT=0 Then 
 CREATE Main_Planning_Data WITH Main_Planning_Data.MPD_ID=INFO1.EKANBANid ….. 


Step 3. if it does find if, update certian fields of the record

Code: Select all

If SEARCH_COUNT>0 Then 
Main_Planning_Data.STRIKE_DATE=INFO1.StrikeDate….  
BLOMASKY
Posts: 1470
Joined: Wed Sep 30, 2015 10:08 pm
Location: Ocala FL

Re: Process not looping though all records

Post by BLOMASKY »

I would check for data overflow. Perhaps one of the numeric fields had a bad calculation and is too large? Perhaps one of the alpha fields is too long?

A way to check would be to write a SQL insert statement and see if it breaks

INSERT INTO AwareDB (id, basversion, bastimestamp, attr1, attr2....)
select next value for basIDgen, 1, getdate(), attr1, attr2...
from SOURCETable

and see if you get any errors.

Bruce
Post Reply