Professional Documents
Culture Documents
1901 F 0002
1901 F 0002
As
Declare t_fprescisao_id Type Of Column fprescisao.id;
Begin
/*Inicio da opera��o insert/update*/
If (New.id_fpprocesso Is Not Null) Then
Begin
If (((Select Count(*) total
From fpprocesso
Where fpprocesso.id = New.id_fpprocesso
And fpprocesso.id_tbemphos = New.cod_emp) = 0)) Then
Exception e_geral_id_tbemphos;
End
/*Fim da opera��o insert/update*/
Select Count(id)
From fprescisao
Where id = New.id
Into t_fprescisao_id;
End
End
End
/*Fim da opera��o insert*/
End;