Recursive SQL for tree like structures

The WITH clause in SQL assuming it is supported by your database allows the database to perform lookups against hierarchical structure using what is known as a Common Table Expression (CTE). A common use case for this would be the LOCATION table in Curam where you’d want to determine if a given location is inside another location or to provide a list of locations that are underneath a higher level location.
Continue reading Recursive SQL for tree like structures