I think perhaps you are asking for something that the OCI doesn't provide. At least I'd be rather surprised if it did. I know that the SQL syntax doesn't provide for such a mechanism.
And really, it all boils down to the list comprehension: in_clause = ', '.join([':id%d' % x for x in xrange(len(ids))]) ... elegance is certainly subjective, and the above statement isn't the cleanest ever, but it solves your main problem while avoiding the other problem you mentiong (sql injection). Seems "elegant enough" to me. -- http://mail.python.org/mailman/listinfo/python-list