Harald Armin Massa wrote at 2007-1-8 19:01 +0100: >Sometimes I have to get additional data for a set of ids, the usual select of > >select whatever from sometable where id in (1,2,3,4,5) > >Next level is, [1,2,3,4,5] is a Collection in Python (List, Tuple, Set) > >to transcribe it as > >cs.execute("select whatever from sometable where id in (%(pyeles)s)", >dict(pyeles=[1,2,3,4,5])) > >obviously does not work.
Does "cx_Oracle" support Python parameter style? Maybe not. Then use a parameter style supported by "cx_Oracle". If the problem is not the parameter style, it may be the sequence --> string conversion. In this case, use can use ",".join([1,2,3,4,5]) instead of "[1,2,3,4,5]". -- Dieter _______________________________________________ DB-SIG maillist - DB-SIG@python.org http://mail.python.org/mailman/listinfo/db-sig