Okay, I assume that python strings have a maximum size => this could be causing the problem. Why is not throwing an exception? I'll try and store all the SQLs in a list, but is there an easier / more efficient way? Cheers, Lee