Re: SQl to MYSQL
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.
Edited 1 time(s). Last edit at 06/30/2018 08:52PM by Peter Brawley.
Subject
Views
Written By
Posted
1379
June 30, 2018 10:32AM
Re: SQl to MYSQL
510
June 30, 2018 08:52PM
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.