A simple example of recursion using SQL Server and Common Table Expressions (CTEs). Thanks to +Nikola Gujanicic for the request.