Need sql query which deletes duplicate iterations and version of document.
Also need sql query for fetching duplicate Document ida2a2 value.
Appreciate your help, Thank you!
Solved! Go to Solution.
SELECT IDA2A2 FROM WTDOCUMENT
WHERE IDA3MASTERREFERENCE = (SELECT IDA2A2 FROM WTDOCUMENTMASTER WHERE WTDOCUMENTNUMBER LIKE 'YOURNUMBERHERE')
It should not be possible to have duplicate iterations and versions of a document. IDA2A2 must be unique and there should be a constraint that enforces this. Are you talking about purging? Did something occur in your database?
If you are referring to iteration history, you do not do this via SQL but use purge manager to clear those.
if you are referring to Query Builder reports, there is an option to remove duplicates if you are not already filtering for things like latest iteration in your constraints.
If this is some deep database issue, please explain more since something does not seem right.
I need sql query to fetch ida2a2 value of document of all versions and iterations
SELECT IDA2A2 FROM WTDOCUMENT
WHERE IDA3MASTERREFERENCE = (SELECT IDA2A2 FROM WTDOCUMENTMASTER WHERE WTDOCUMENTNUMBER LIKE 'YOURNUMBERHERE')
Thank you very much!