• Recursive CTE's are great for answering hierarchical questions, but usages such as this strike me as a bit lame. Despite your disclaimer, it looks as though less reasoning types will use this way beyond the narrow scope intended by the article.

    I'd much rather see the Database Vendor support regular expressions in a more comprehensive manner (e.g perl-compatible etc).

    select replace(PhoneNumber, '\D', '', 'g') as "Cleaned Phone Number"

    from .......

    ......