Fórum TRIGGER com IF #39782
30/10/2003
0
Galera estou querendo fazer uma checagem em dois valores (QTDE_SALDO e QTDE_TOTAL) onde c o primeiro for >= ao segundo CONCLUIDO =1;
Mas porque não consigo fazer tal checagem,,,
Já fiz varias TRIGGER um ex: está abaixo:
CREATE TRIGGER ENCERA_O_PEDIDO ACTIVE before update POSITION 0
AS
declare variable QTDE_SALDO Numeric(9,3);
declare variable QTDE_TOTAL Numeric(9,3);
begin
IF (QTDE_SALDO >= QTDE_TOTAL) THEN
NEW.CONCLUIDO = 1;
End
Como devo criar a TRIGGER e também não obtive sucesso com SPs
Mas porque não consigo fazer tal checagem,,,
Já fiz varias TRIGGER um ex: está abaixo:
CREATE TRIGGER ENCERA_O_PEDIDO ACTIVE before update POSITION 0
AS
declare variable QTDE_SALDO Numeric(9,3);
declare variable QTDE_TOTAL Numeric(9,3);
begin
IF (QTDE_SALDO >= QTDE_TOTAL) THEN
NEW.CONCLUIDO = 1;
End
Como devo criar a TRIGGER e também não obtive sucesso com SPs
Marcos Fernando
Curtir tópico
+ 0
Responder
Posts
01/11/2003
Afarias
set term ^;
CREATE TRIGGER ENCERA_O_PEDIDO FOR <nome_da_tabela>
ACTIVE before update POSITION 0
AS
begin
IF (NEW.QTDE_SALDO >= NEW.QTDE_TOTAL) THEN
NEW.CONCLUIDO = 1;
End^
T+
CREATE TRIGGER ENCERA_O_PEDIDO FOR <nome_da_tabela>
ACTIVE before update POSITION 0
AS
begin
IF (NEW.QTDE_SALDO >= NEW.QTDE_TOTAL) THEN
NEW.CONCLUIDO = 1;
End^
T+
Responder
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)