>This error cold be generated if script is run in wrong database.
Good idea, but this was one of the first things I checked. I tried a similar script for tables in other databases and I could not reliably duplicate the problem. So, maybe it is something maybe about my database.
I'll have to do this again at some point. Hope I can identify a pattern if it happens again.
Del
Del