@KamikazeBassi - Just be aware that this works OK when your lookup table is relatively small. It won't work if you have millions of rows to select on as your WHERE clause will get too big.
... View more
Thanks for all the solutions, I am just trying them out to find which works most efficiently for my dataset. The dataset is quite large. thanks Ninder
... View more