Desafio que eu recebi ( escrever uma procedure que atenda ao pedido abaixo )
"Preciso que o sistema insira uma TAG e altere o status dos contratos do banco Itaú. O comando funcionaria da seguinte forma, quando o contrato estiver com consistência irá receber o seguinte:
TAG: CONSISTÊNCIA
STATUS: CONSISTÊNCIA
Comando de retirada: Quando o contrato não tiver mais a consistência, removerá a TAG e o Status sera alterado para “Consistência Resolvida”
Obs.: Vão existir casos em que o usuário poderá retirar a consistência, então o comando precisa fazer a alteração do status para Pendente Promotora, e manter a TAG de CONSISTÊNCIA."
TABELA : CONTRATO
COLUNAS : BANCO, TAG, BIT_CONSISTENCIA, STATUS
Challenge I received (write a procedure that meets the request below)
"I need the system to insert a TAG and change the status of Itaú bank contracts.
The command would work as follows, when the contract is consistent you will receive the following:
TAG: CONSISTÊNCIA
STATUS: CONSISTÊNCIA
Withdraw Command: When the contract no longer has consistency, it will remove the TAG and the Status will change to "Consistency Resolved"
Note: There will be cases in which the user can remove consistency, so the command needs to change the status to Pending Promoter, and keep the CONSISTENCY TAG." - (“Consistência Resolvida”)
TABLE: CONTRATO
COLUMNS: BANCO, TAG, BIT_CONSISTENCIA, STATUS