MySQL Forums
Forum List  »  Stored Procedures

Re: SQl to MYSQL
Posted by: Mauricio Pires Kalfelz MauVirtual
Date: July 01, 2018 06:23PM

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

Options: ReplyQuote


Subject
Views
Written By
Posted
1379
June 30, 2018 10:32AM
511
June 30, 2018 08:52PM
Re: SQl to MYSQL
557
July 01, 2018 06:23PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.