Something like this might work for you:

>>> ids= ['D102', 'D103', 'D107', 'D108']
>>> in_clause = ', '.join([':id%d' % x for x in xrange(len(ids))])
>>> sql = "select * from tablename where id in (%s)" % in_clause
>>> import cx_Oracle as ora
>>> con = ora.connect('foo/[EMAIL PROTECTED]')
>>> cur = con.cursor()
>>> cur.execute(sql, ids)

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to