MySQL Forums
Forum List  »  German

Re: Probleme beim Insert
Posted by: Michael Feske
Date: November 05, 2019 04:26AM

Bist Du sicher mit .*C*ontrollino2 ?
Bei mir funktionieren:
INSERT INTO controllino2 (CID,PORT,Datum,Stunde,Wert) VALUES (1,'A2',DATE(CURDATE()),(SELECT MAKETIME(HOUR(CURTIME()),MINUTE(CURTIME()),'00')),1) ON DUPLICATE KEY UPDATE Wert = Wert + If(VALUES(Wert) = -1,Wert * -1,VALUES(Wert));
INSERT INTO controllino2 (CID,PORT,Datum,Stunde,Wert) VALUES (1,'A1',DATE(CURDATE()),(SELECT MAKETIME(HOUR(CURTIME()),MINUTE(CURTIME()),'00')),0) ON DUPLICATE KEY UPDATE Wert = Wert + If(VALUES(Wert) = -1,Wert * -1,VALUES(Wert));

Options: ReplyQuote


Subject
Views
Written By
Posted
252
November 05, 2019 03:05AM
128
November 05, 2019 04:22AM
109
November 05, 2019 04:48AM
Re: Probleme beim Insert
119
November 05, 2019 04:26AM
104
November 05, 2019 04:51AM


Sorry, only registered users may post in this forum.

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.