I came across one place in my code which documented the problem I was having wit temp tables.
I was inserting into an existing temp table. The data came from a view and I was doing a group by on the selected data coming out of the view I frequently would get I/O errors, but not all the time. So, I projected an empty temp table from the target table. Then, I did the insert to the fresh new table. Then, I appended the new table to the target table. I haven't had the problem since. I hope this help someone eliminate at lease some errors. Dennis McGrath

