Thanks, Dude; yes, I was aware of that, but on re-reading the code I'd written it looks as though I'd managed to get a COPY command going the wrong way!
I clearly need to take a closer look at what I've written to see if that's the only problem or if I've managed to do something else stupid!
Thanks!
JOhn