I try to execute the following query as a prepared statement:
self.cursor.execute("select distinct ? from isap.tn_documentation where ? = '?' and ? <> ''", attribute2, attribute1, i.text(0), attribute2)
After execution i get the following error:
The SQL contains 3 parameter markers, but 4 parameters were supplied', 'HY000