The 365 Data Science team is proud to invite you to our own community forum. A very well built system to support your queries, questions and give the chance to show your knowledge and help others in their path of becoming Data Science specialists.
Ask
Anybody can ask a question
Answer
Anybody can answer
Vote
The best answers are voted up and moderated by our team

MySQL Triggers exercise and solution

MySQL Triggers exercise and solution

Super Learner
0
Votes
1
Answer

Hello,
When trying to execute the INSERT function of the following code: INSERT employees VALUES (‘999904′,’1970-01-31′,’John’,’Johnson’,’M’, ‘2025-01-01’);
I receive the following error…please advise!:) 🙂 :
 

0
43
09:24:11
INSERT employees VALUES(‘999904′,’1970-01-31′,’John’,’Johnson’,’M’, ‘2025-01-01’)
Error Code: 1292. Truncated incorrect date value: ’20–m,06′
0.000 sec

1 Answer

365 Team
0
Votes

Hi Matt!
Thanks for reaching out.
The error message is saying, that the date value you are trying to add is actually the following:

’20–m,06′

What this suggests is that you haven’t used single quotes on both ends of the expression, but you have used a single quote ( ‘ ) once, and a back quote the other time ( ` ). Please make sure you’re using single quotes (or double quotes) on both sides.
If this doesn’t resolve the problem, can you please paste the entire trigger query, so that we can look into more detail? Thank you.
Hope this helps.
Best,
Martin
 

Hello,

I am getting the same error. As suggested by Martin, I did check for the single quotes.

The error states that:

Error Code: 1292. Truncated incorrect date value: '2020-July-12th'

4 weeks