Thanks for the nice feedback.
I appreciate and like the solution you have provided. Your code is shorter too for which I like it even more.
Just to see from a performance perspective, I tried executing both the code snippets in the same batch. The Query cost (relative to the batch) was 17% for the one in the article. The same for the alternative version was 83%.
Notwithstanding the minor performance difference since the data volume in the code is very limited, I still like your code for its brevity.
------Thanks and Best Regards,
M Suresh Kumar