My idea is to be able to insert the sum between 2018-07-12
and 9 days ( SELECT "" + interval 9 day)
) in the column fechaFin
of the same table.
But first I want to identify a row of T_tarifa
with where
but it is not allowed.
Is there a different way to do the same? Can not the where
be used after an operation with parentheses?
insert into T_tarifa (fechaFin) values (SELECT "2018-07-12" + interval 9 day) where regimen="desayuno
Resolved:
INSERT INTO T_tarifa (precioNoche,fechaInicio,fechaFin,tarifa) values ((SELECT precio FROM T_tiphab where codHotel="1" and tipo="camasimple"),"2018-11-01",( "2018-11-01" + interval 9 day),4 * (select precio from T_tiphab where tipo="camasimple" and codHotel= 1));