Having problems with the TypeError below:

order_list = ['25459 ', '12381 ', '25375 ']

cursor.execute("SELECT  WVGID6 , WVWHID, WVITNO, WVLOCA FROM WMRSV WHERE OHORNO IN (%s)"% tuple(order_list))
TypeError: not all arguments converted during string formatting

The correct SQL should look like:

SELECT  WVGID6 , WVWHID, WVITNO, WVLOCA FROM WMRSV WHERE OHORNO IN ('25459 ', '12381 ', '25375 ')

Which SQL are you using? If it's SQLite, it does not support this feature.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.