Fellow SQL Server MVP Adam Machanic mentioned an interesting challenge from the most excellent blog of Ken Henderson. (Why mention such an old post? Well, it's the day before my birthday and I was wondering if anything interesting happened that day in the MVP world. That's why! But I digress...)
The challenge is to write self-replicating Transact-SQL code:
Wondering how to solve the puzzle? Another SQL Server MVP, Anith Sen, suggested that a Google search on quine puzzle would do the trick. Check out these resources:
And if you're feeling really adventurous, you can do your own search for answers provided by Adam Machanic himself plus the answer provided by Steve Kass, another highly skilled Transact-SQL coder and MVP in his own right.