“As an advocate for SQL for Oracle Corporation, I naturally have a soft spot for any innovative usage of the language to solve problems. SQL is often seen as not being "sexy" because fundamentally it's most common usage will be in solving the requirements of common business-related tasks; "sales for the year"; "employees hired this month", and the like. It is often viewed as being the tool to solve the mundane. So, I was intrigued when I got wind of a post by Anton Scheffer with a SQL statement to solve the classic puzzle of Sudoku.
It was back in in 2009 for the NoCOUG SQL challenge that the problem-solving capabilities of the recursive WITH statement first revealed themselves to me, but Anton's solution was perhaps the one that captured the internet with its elegance. The first few times I showed this to friends and colleagues, their initial reaction was typically not amazement but scepticism, because surely with the SQL statement being so concise, this was simply a parlour trick of string manipulation not a true solving of the problem we all spend hours pouring over (most commonly for me on those long flights to conferences!). Such was the level of their doubt. I often needed to remove the terminating condition to show the brute force recursion at work, in order to convince the doubters of the sophistication of Anton's code."