Looks like it's retrieving one line on my system when I run it. I would have to ask my client for access to her server in order to see what it's retrieving on hers. (Was that the point? To see if she was getting something there, not whether I was?)
As for the upgrade, the company I work for had made the decision to stick with this version due to a change that came along in Version 9 that we had not wanted. That being said, I do have a couple of clients using later versions as we could no longer obtain 8.5 and they don't seem to be having issues with this piece of code.
And I just had a thought as I was writing this....if that table is totally empty for some of my clients because they aren't using that module of our software suite, would that be the issue? This is the first time I have ever implemented an Autogenerate table in a script, and it didn't occur to me, unbelievably!