1
I am trying to make an Insert in my database with the following command:
UPDATE movimentacao_almox SET quantidade = 100, qtd_pendente = 2 WHERE id = 1113;
but I get this mistake:
Error Code: 1054. Unknown column 'movimentacao_almox.cod_promob' in 'where clause'
As you can see, I don’t use this column movimentacao_almox.cod_promob
at my command.
I would like to understand what is happening and how to solve.
Would it be possible to provide more context for the error you are experiencing? Do you have any other query running at this time?
– Joel Piccoli da Rosa
Well remembered. tem uma trigger no Before Update: UPDATE cadastro_mp SET estoque_atual = old.movimentacao_almox.quantidade + new.movimentacao_almox.quantidade 
WHERE 
cadastro_mp.cod_promob = movimentacao_almox.cod_promob AND cadastro_mp.almoxarifado = movimentacao_almox.almoxarifado; END
– Francisco Salome
There’s probably your problem so he’s not finding this
cod_promob
before updating your registration.– Joel Piccoli da Rosa
The strange thing is that the column exists in all tables referenced.... I will try to change Before by After update
– Francisco Salome
See there and confirm us... ;)
– Joel Piccoli da Rosa
It worked!! I’ll post the changes I made in response! Thank you
– Francisco Salome
Great guy! Let’s go another... ;D
– Joel Piccoli da Rosa