Recursive Queries on the iSeries and System i
June 12, 2006 Michael Sansoterra
Who would’ve guessed, but we’re almost done with the long list of SQL enhancements introduced in release V5R4 of i5/OS. Sorrow not, though, because this tip will bring abundant joy as a major limitation of SQL has just been lifted–the ability to run a query recursively. Recursive queries are queries that need to do multiple self joins an unknown number of times. Take, for example, an employee master table that contains an employee’s employee number and the manager’s employee number. Say we need a list of all employees along with a listing of all manager’s above the employee. To do |