When I choosed python--cx_Oracle to query data, I can get correct query result when the variable only one number or str, code as below
sql = cursor.execute('''
select A.NUMBER,A.NAME
from table_a A
where A.NUMBER in :alist
''', alist='12345a')
Now, I'd like to query many datas(pass many numbers/str in to 'alist'), I dont's know how to achieve my proposal. Below code didn't work: (cx_Oracle.NotSupportedError: Python value of type tuple not supported.)
sql = cursor.execute('''
select A.NUMBER,A.NAME
from table_a A
where A.NUMBER in :alist
''', alist=('12345a','12345b'))
P.S.: I know in Oracle, I should query like this:
select A.NUMBER, A.NAME from table_a A where A.NUMBER in ('12345a','12345b','12345c')
Anybody can help me to modify my code? thank you in advance :)