MySQL Forums
Forum List  »  MySQL for Excel

Re: Error saving time back to MYSQL
Posted by: Rod Miller
Date: June 05, 2017 05:33PM

The SQL statement that is being applied is

UPDATE `fafa1424_records`.`newrecords` SET `timeOfCall`=03:30:00 WHERE `id`=1497 AND `memberID`='0834' AND (('0834-15-0009' IS NULL AND `animalID` IS NULL) OR `animalID`='0834-15-0009') AND `nickName`='Fideous' AND `animal`='Wallaby, Red-necked' AND (('M' IS NULL AND `family` IS NULL) OR `family`='M') AND (('1261' IS NULL AND `code` IS NULL) OR `code`='1261') AND (('2015-06-14' IS NULL AND `dateOfEncounter` IS NULL) OR `dateOfEncounter`='2015-06-14') AND (('Armidale road, 16' IS NULL AND `encounterAddress` IS NULL) OR `encounterAddress`='Armidale road, 16') AND (('2440 - WILLAWARRIN' IS NULL AND `postcode` IS NULL) OR `postcode`='2440 - WILLAWARRIN') AND (('Kempsey Shire Council' IS NULL AND `LGA` IS NULL) OR `LGA`='Kempsey Shire Council') AND (('Collision - Motor Vehicle' IS NULL AND `encounterType` IS NULL) OR `encounterType`='Collision - Motor Vehicle') AND (('No apparent distress' IS NULL AND `animalCondition` IS NULL) OR `animalCondition`='No apparent distress') AND (('' IS NULL AND `comment` IS NULL) OR `comment`='') AND (('Male' IS NULL AND `animalSex` IS NULL) OR `animalSex`='Male') AND (('Juvenile' IS NULL AND `age` IS NULL) OR `age`='Juvenile') AND (('697g' IS NULL AND `initalWeight` IS NULL) OR `initalWeight`='697g') AND (('N/A' IS NULL AND `pouchCondition` IS NULL) OR `pouchCondition`='N/A') AND (('Dianne Gorham' IS NULL AND `initialAssessor` IS NULL) OR `initialAssessor`='Dianne Gorham') AND (('0834 - Betty Booth' IS NULL AND `rehabilitatorName` IS NULL) OR `rehabilitatorName`='0834 - Betty Booth') AND (('Escaped From Care' IS NULL AND `fateOfAnimal` IS NULL) OR `fateOfAnimal`='Escaped From Care') AND (('' IS NULL AND `memberHolding` IS NULL) OR `memberHolding`='') AND (('2015-11-14' IS NULL AND `dateOfFate` IS NULL) OR `dateOfFate`='2015-11-14') AND (('' IS NULL AND `releaseLocation` IS NULL) OR `releaseLocation`='') AND (('' IS NULL AND `releasePostcode` IS NULL) OR `releasePostcode`='') AND (('' IS NULL AND `releaseGPS` IS NULL) OR `releaseGPS`='') AND (('' IS NULL AND `chipNumber` IS NULL) OR `chipNumber`='') AND (('0108 - Joy Mackay' IS NULL AND `rehabilitator1` IS NULL) OR `rehabilitator1`='0108 - Joy Mackay') AND (('1566 - Noeline Patterson' IS NULL AND `rehabilitator2` IS NULL) OR `rehabilitator2`='1566 - Noeline Patterson') AND (('0901 - Diane Gorham' IS NULL AND `rehabilitator3` IS NULL) OR `rehabilitator3`='0901 - Diane Gorham') AND (('1577 - Narelle Anderson' IS NULL AND `rehabilitator4` IS NULL) OR `rehabilitator4`='1577 - Narelle Anderson') AND (('2015-06-15' IS NULL AND `date_transfer1` IS NULL) OR `date_transfer1`='2015-06-15') AND (('2015-07-16' IS NULL AND `date_transfer2` IS NULL) OR `date_transfer2`='2015-07-16') AND (('2015-10-09' IS NULL AND `date_transfer3` IS NULL) OR `date_transfer3`='2015-10-09') AND (('2015-11-02' IS NULL AND `date_transfer4` IS NULL) OR `date_transfer4`='2015-11-02') AND ((12:20:00 IS NULL AND `timeOfCall` IS NULL) OR `timeOfCall`=12:20:00) AND (('' IS NULL AND `callerDetails` IS NULL) OR `callerDetails`='') AND (('' IS NULL AND `contactNumber` IS NULL) OR `contactNumber`='') AND (('' IS NULL AND `incidentDetails` IS NULL) OR `incidentDetails`='') AND (('' IS NULL AND `memberContacted` IS NULL) OR `memberContacted`='') AND (('' IS NULL AND `actionTaken` IS NULL) OR `actionTaken`='') AND (('' IS NULL AND `finalised` IS NULL) OR `finalised`='') AND ((2 IS NULL AND `recordFinalised` IS NULL) OR `recordFinalised`=2);

The error that I'm getting is:

MySQL Error 1064:
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ':30:00 WHERE `id`=1497 AND `memberID`='0834' AND (('0834-15-0009' IS NULL AND `a' at line 1

I know that its the time format because if I change it to be VARCHAR it works fine.

Rod

Options: ReplyQuote


Subject
Views
Written By
Posted
803
June 05, 2017 12:35AM
Re: Error saving time back to MYSQL
775
June 05, 2017 05:33PM


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.