I can't use executemany function at all from pymysql, I'm using this reduced example:
cursor = self.connection.cursor()
sql_query = f"UPDATE lançamento SET {column_name} = %s WHERE STR_TO_DATE(Data, '%d/%m/%Y') > %s AND Caixa = %s;"
cursor.executemany(sql_query, [(str(value), str(current_date), self.back_end_insert_caixa_name) for value in values])
all values are as str, but I get the exception:
%d format: a real number is required, not str
the type of column_name in my sql database is float but when I try change %s to %f and str(value) to float(value) I get this exception:
a real number is required not str
How do I solve this?