Hi, I have a table that contains steps of a work order processing. Normally, each step should have it's closed flag set to Y as it gets finished. Sometimes this doesn't happen, so there are steps left open with lower sequence than steps that are already closed. I would need to select all these steps (incorrectly left opened).
For simplicity, the table JOB_OPERATIONS have columns JOB, SUFFIX, SEQ and FLAG_CLOSED. Every work order has it's unique job and suffix number combination. Each step has it's ascending sequence number in SEQ. Step can be either closed (Y in FLAG_CLOSED) or opened (FLAG_CLOSED empty).
All I could figure out is using two views and join them in a query but Pervasive 8.6 doesn't support grouped views (ODBC Error: SQLSTATE = S1000, Native error code = 0 Grouped view joins are not supported.) I am not sure if upgrade is an option.
Is there any other way how to get the records I need?