Questions tagged [sql-mode]

The MySQL server can operate in different SQL modes, and can apply these modes differently for different clients, depending on the value of the sql_mode system variable. DBAs can set the global SQL mode to match site server operating requirements, and each application can set its session SQL mode to its own requirements.

102 questions
0
votes
1 answer

MYSQL Strict Mode

For STRICT_ALL_TABLES, MySQL returns an error and ignores the rest of the rows. However, because the earlier rows have been inserted or updated, the result is a partial update. To avoid this, use single-row statements, which can be aborted without…
0
votes
1 answer

Modifying the "settings" of the MySQL stored procedures

According to the MySQL documentation, stored procedures are executed with the sql_mode in which they were created. I need to change the sql_mode parameter for a specific stored procedure SHOW CREATE PROCEDURE command - shows the current…
Eugene
  • 151
  • 8
0
votes
1 answer

sql_mode incompatible codeigniter 4

I have a query, it works fine on the local wamp server, but uploading to mye webserver gives me an error. Have looked at similar solutions but cant understand it enough to adapt it to my query. The error: Expression #1 of ORDER BY clause is not in…
Bengt
  • 65
  • 1
  • 7
0
votes
0 answers

Allow invalid date in laravel

I have below query which is working if i run it directly on PHPMyadmin but not when i run it using laravel. select SUM(p.quantity_held * s.current_share_price) as mv from portfolio_holding p, portfolios po, securities s where `p`.`security_id` =…
DS9
  • 2,995
  • 4
  • 52
  • 102
0
votes
2 answers

MYSQL 8 : SQL Mode for Datetime invalid?

I know, it's ugly but things used to work and we can't change this : #1525 - Incorrect DATETIME value: '' For a query SELECT * FROM table WHERE date_change='' Is there a SQL mode for MySQL 8? Or any idea?
David N
  • 118
  • 1
  • 7
0
votes
0 answers

MySql behaves differently on RDS and local docker container

There is a difference in the behavior of my local MySQL docker container and the RDS instance in another environment. I have read up on the documentation about this error and different options for sql_mode. But I could not figure out where this…
webtopf
  • 304
  • 3
  • 12
0
votes
1 answer

Error in SQL query GROUP BY clause; sql_mode=only_full_group_by

Please help me with this SQL query; when I use a GROUP BY clause, I get this error from Mysql: This is incompatible with sql_mode=only_full_group_by I want different values on column: B.shopname. SELECT A.id, COUNT(A.id), A.idShop, …
0
votes
0 answers

How to solve error this is incompatible with sql_mode=only_full_group_by

I made a post today on that but nobody did answer my question. I'm getting SQL error "this is incompatible with sql_mode=only_full_group_by". I did execute this SQL command: SET GLOBAL sql_mode=(SELECT…
user15296676
0
votes
1 answer

Bypassing the only_full_group_by restriction

I have this simple table: mysql> select deviceId, eventName, loggedAt from foo; +----------+------------+---------------------+ | deviceId | eventName | loggedAt | +----------+------------+---------------------+ | 1 | foo |…
cherouvim
  • 31,725
  • 15
  • 104
  • 153
0
votes
1 answer

JPA, distinct, order by, null values and ONLY_FULL_GROUP_BY sql mode

I have a JPA query structured like this: SELECT distinct item FROM ... WHERE ... ORDER BY ... I'm using MySQL 8 and because I'm using the ORDER BY clause to sort by item properties, area name country name and brand name) I was getting this…
demetrio812
  • 290
  • 3
  • 15
0
votes
1 answer

Error while executing a SQL query using MySQL db and Python client

I have a complex SQL query as below which I am using to access MySQL db from a Python script. sql_query_vav = """SELECT t1.deviceId, t1.date, t1.vavId, t1.timestamp, t1.nvo_airflow as airflow, t1.nvo_air_damper_position as damper_position ,…
chink
  • 1,505
  • 3
  • 28
  • 70
0
votes
1 answer

restarting MySQL on ubuntu after changing sql mode

I am getting an error in mysql Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'returntr_prod.tbl_customer_pod_uploads.id' which is not functionally dependent on columns in GROUP BY clause; this is…
chink
  • 1,505
  • 3
  • 28
  • 70
0
votes
0 answers

Default global sql_mode setting for server

I have the sql_mode on a shared server set to ONLY_FULL_GROUP_BY,​STRICT_TRANS_TABLES,​NO_ZERO_IN_DATE,​NO_ZERO_DATE,​ERROR_FOR_DIVISION_BY_ZERO,​NO_AUTO_CREATE_USER,​NO_ENGINE_SUBSTITUTION What would happen if I removed these variables, and it…
lordmwesh
  • 1
  • 1
0
votes
0 answers

made sql_mode blank from my.cnf in centos 7 still got this is incompatible with sql_mode=only_full_group_by

Stuck in an issue with sql_mode restriction. Made the change in /etc/my.cnf and restart the mysql.d but getting the same error. In aggregated query without GROUP BY, expression #2 of SELECT list contains nonaggregated column…
PHP buddy
  • 31
  • 2
0
votes
0 answers

Different postgrese behavior in similar databases

I use PHP 7.1 with Pgsql 9.2.24. Have two similar copy of project (production and development) and two similar databases with the same data on it. But queries work differently in GROUP BY case. I tried to check all the sql settings with SHOW ALL…
Valik Tralik
  • 69
  • 1
  • 12