1
I am trying to select with LIKE operator using an array, but it is returning error when forming the string.
SCRIPT
placeholder= '?'
placeholders= ', '.join(placeholder for unused in NAMES)
query= "select * from DADOS where CLIENTNAME like %%s%" % placeholders
ibm_db_cur.execute(query, NAMES)
resultFinal = ibm_db_cur.fetchall()
for linha in resultFinal:
print(linha)
OUTPUT
Valueerror: incomplete format
API BD
import ibm_db
import ibm_db_dbi
ARRAY
NAMES = ['client1','client2','client3']
Whoa, that was it, buddy, thank you very much!
– Luis Henrique