I believe Integrity Checker will also report these. It might be a good idea to run this in case there are other issues lurking. I don't recall if it lists the workorders, but you can see the SQL used in the log. 😊
------------------------------
Steven Hauptman
IBM
------------------------------
Original Message:
Sent: 05-10-2023 20:05
From: Craig Kokay
Subject: Search workorder records not inserted in woancestor through query
Hi Travis,
There is a flaw in your query. The WORKORDER object exists at the site level. So, the work order number could be repeated in each site. You need to involve the SITEID. I generally find an EXISTS or in this case, a NOT EXISTS statement is much less costly and is faster, but just crafting the SQL statement to involve the fields involved in an index will also be faster. I've included a version here.
SELECT wonum
FROM WORKORDER w
WHERE NOT EXISTS
(SELECT 1 FROM WOANCESTOR w2
WHERE w2.wonum = w.WONUM
AND w2.SITEID = w.SITEID );
------------------------------
Regards,
Craig Kokay
ISW
Maximo Practice Manager
eMail: ckokay@isw.net.au
Phone: +61-411-682-040
#IBMChampion2023
Original Message:
Sent: 11-21-2022 10:29
From: Travis Herron
Subject: Search workorder records not inserted in woancestor through query
SELECT wonum FROM workorder WHERE wonum NOT IN (SELECT wonum FROM woancestor)
Is that what you are asking for?
------------------------------
Travis Herron
Pensacola Christian College
Original Message:
Sent: 11-01-2022 11:37
From: Ramesh Kumar
Subject: Search workorder records not inserted in woancestor through query
Does anyone have query to find the missing records of woancestor table that are present in workorder but its entry is not made woancestor table by system.
#WorkManagement
------------------------------
Ramesh Kumar
student
------------------------------