Code where the problem occurs:
def updateEmpresaSetXEqualsToByCnpj(self, nomeColuna, valor, cnpj):
query = (r"UPDATE empresa_cliente SET {0} = {1} WHERE cnpj_emp = '{2}';".format(nomeColuna, valor, cnpj))
I'm sending a string, a int and a string. The last param must have single quotes cause SQL SERVER syntax but the python is putting double back slash before each single quotes. e.g.
UPDATE empresa_cliente SET regime_tributacao_federal = 1 WHERE cnpj_emp = \\'33333222000111\\';
When the correct query should be
UPDATE empresa_cliente SET regime_tributacao_federal = 1 WHERE cnpj_emp = '3333222000111';