Resolved: Getting error code 1140 even after trying the fixes.
Still gtting error code 1140 even after applying the fixes from another persons question. I made sure to restart MySQL after each fix. Any help?
Hi Donald!
Thanks for reaching out!
Please, remove the concat() method. Actually, you first remove this mode and then you add it. You have to run only:
set @@global.sql_mode := replace(@@global.sql_mode, 'ONLY_FULL_GROUP_BY', '');
and then restart the Workbench.
Hope this helps.
Best,
Tsvetelin
Ok that worked Thanks!
You are very welcome!
Kind regards,
Martin,
The 365 Team
I am just running the replace method, but still am getting the same error. Could you help me out and at same time eplxain what is this replace and contact method?
Hi Saeed!
Thanks for reaching out.
These are methods. The REPLACE()
method replaces all occurrences of a substring within a string, with a new substring. The CONCAT()
method adds two or more strings together. In order to resolve the issue, you should restart the Workbench or reconnect to the server.
Hope this helps.
Best,
Tsvetelin
Hi,
Even though I have implemented the procedure to solve the Error code 1140, it still comes up.
so:
set @@global.sql_mode := replace(@@global.sql_mode, 'ONLY_FULL_GROUP_BY', '');
Then:
Restart MySql application.
Then execute call code:
CALL emp_avg_salary(11300);
This is not working for me.
Can you please assist.
Thank you.
Hi Maurice!
Thanks for reaching out.
To fix MySQL error 1140 after setting `sql_mode` without `ONLY_FULL_GROUP_BY` and restarting MySQL, ensure the `sql_mode` change is persistent by editing the MySQL configuration file. If the error persists, check the `emp_avg_salary` procedure for issues unrelated to `GROUP BY`. Confirm all selected columns in `GROUP BY` queries are properly aggregated or listed in the clause. Test the query outside the procedure, and consult MySQL documentation or forums with the exact error message for more help.
Hope this helps.
Best,
Tsvetelin