Hi!
Sometimes I need to deactive all indices (for some special processing whose
intermediate results can invalidate constraints) and then reactive them all
again. Of course, I can do this with DB restore option which does not activate
indices during restore process. But so far I have always
Thanks Dimitri, unfortunately we are using FB 2.5
ROW_NUMBER, as Dimitry suggests, is available from Firebird 3. The
following query should work regardless of Firebird version:
SELECT s.*
FROM SALARIES s
LEFT JOIN SALARIES s2 on s.EMPID = s2.EMPID and s.EFFDATE < s2.EFFDATE
LEFT JOIN SALARIES s3 on s2.EMPID = s3.EMPID and s2.EFFDATE < s3.EFFDATE