Considering Jeff's suggestion, I ran the query on the server itself but with the same results. As Denny points out it is the problem with SSMS (which is built on .NET technology :-(, and as corrrectly pointed out, the error message might be reflecting that).
I even tried to run the same query through sqlcmd, but the results came up with nothing but the header...I am flummoxed! BTW, the query is supposed to return about 42 million rows with just three columns..
The server has 32 GB RAM, 8 CPUs, and SQL Server has been configured to utilize as much as possible, yet...I even searched other sites where one of which had some kind of pointers by a Microsoft expert. He suggested to test it with TOP n rows (I tried 10000 and it works perfectly fine and very fast...) It stops around 33 mil! Sigh!
Should you have any other ideas that I can explore (like would running the query as an SP make difference. Ths SP can probably write the results in a table), please feel free to suggest.
Thanks again for your support.