hi stefan, my guess is the server's just truncating the query at wherever the character limit is, then getting whatever error you'd expect from the incomplete query.. i agree that sending a 1.7 million character query is pretty extreme, but i believe very long strings are unavoidable in
dr. lumley's R sqlsurvey code even if he takes steps to minimize what he can. i don't mean to create a bunch of work for you, i was really just curious if you knew of any hard ceiling. :) thank you!
Error in .local(conn, statement, ...) :
Unable to execute
statement 'select avg(_s__api00_AcaciaElementa),
avg(_s__api00_AdamsElementar), avg(_s__api00_AeolianElement), ...'.
Server says 'syntax error, unexpected $end, expecting ')' in: "select avg(_s__api00_acaciaelementa), avg(_s__api00_adamselementar), avg(_s__api00_aeolianelement),