I'm starting in the Oracle world and my question I believe to be simple for those who understand how the people here ..
99] I would like to create a table with monthly expenses.
For this, I created a table that I will name 'movements' with:
DATA DATE
VALOR NUMBER(10)
TIPO CHAR(1)
HISTORICO VARCHAR2(40)
on another table named 'NOOMEXER', I created the table that I will use in the trigger q will only be for viewing.
SALDO NUMBER(10)
CREDITO NUMBER(10)
DEBITO NUMBER(10)
SALDO_ATUAL NUMBER(10)
I'll insert values ??in the tables table and I need the value that I give insert and the type of the other table enter into the credit or debit depending on the number
hence I began:
create trigger teste
after insert on tabel movimentações
begin
if tipo = '1' then valor = //do debito da segunda tabela//
elsif tipo = '2' then valor = //do credito da segunda tabela//
How do I do this?
Did you understand or become confused?