Peter Brawley Wrote:
-------------------------------------------------------
> Each If... construct is missing three things ...
>
> (i) IF >..
THEN --- THEN is required
>
> (ii) statements require
terminating semicolons
>
>
> (iii) the IF construct must close with
END
> IF;
>
> Thus ...
>
> if exists (Select * from VIAGENS where ID_VIATURA
> = pID_VIATURA AND pDATAHORAINICIO between
> DATAHORAINICIO and DATAHORAFINAL ) THEN
> set DisponibilidadeViatura = 0;
> else
> set DisponibilidadeViatura = 1;
> END IF;
>
>
> Likewise for the other IF constructs.
friend!!!!
you saved my life, the presentation of the work is tomorrow and with your explanation I was able to solve the whole procedure, much, thank you very much for helping a beginner