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

Trim data which is longer than the column length in MySQL

I'm inserting data into a table in MySQL using the following query, LOAD DATA INFILE 'file.csv' INTO TABLE CSVImport FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; But when the length of a particular field is greater than the column length it…
0
votes
2 answers

Run this query without changing the sql_mode

I am trying to test a query in test environment which is as follows Query : - SELECT a.aggreatorid AS aggreatorid, '' AS txndesc, DATE_FORMAT(DATE(b.txndate),'%d/%m/%Y') AS txndate, SUM(txncredit) AS txncredit, SUM(txndebit) AS txndebit FROM…
Abhishek Patil
  • 1,373
  • 3
  • 30
  • 62
0
votes
0 answers

MySQL 5.7 replication of session variable "sql_mode" fails

MySQL documentation for v5.7 states about the replication of variables: In MySQL 5.7, the following session variables are written to the binary log and honored by the replication slave when parsing the binary log, regardless of the logging…
0
votes
0 answers

MySQL sql_mode has unwanted, extra modes

I'm on a Mac, using MySQL workbench, which is telling me the location of my my.cnf file is in /etc/, where I'm editing it. I set the permission on that file with chmod a-w. In that my.cnf file, I have the following:…
0
votes
2 answers

MySQL Error Using DUPLICATE KEY UPDATE

I have a project where on a weekly basis I import several large datasets that contain incorrect data, such as duplicate employee IDs where they should not be duplicates. In an effort to flag the duplicates, I try the following code: ALTER TABLE…
Michael Sheaver
  • 2,059
  • 5
  • 25
  • 38
0
votes
1 answer

How to configure xemacs to recognize database specified in .sql-mode?

I am running xemacs with a .sql-mode file containing the following: 1 (setq sql-association-alist 2 '( 3 ("XDBST (mis4) " ("XDBST" "xsius" "password")) 4 ("dev " ("DEVTVAL1" "xsi" "password"…
user3446781
0
votes
1 answer

MySQL 5 and Server sql-mode

First of all, sorry for my language. Actually, I've tried to move a PHP application using MySQL 4 to another server using MySQL 5.6.11. Like a lot of people, I had the problem: "Incorrect integer value: '' for column 'id' at row 1" I understood…
0
votes
1 answer

emacs sql-mode: how to scroll the the output window after run the sql?

I am pretty happy with emacs sql-mode with vertica. But one problem is after run the sql using C-c C-c, ifoutput window is full of text, and the output text I want to see in not visible, so I have to jump to the output window, scroll down to the…
Daniel Wu
  • 5,853
  • 12
  • 42
  • 93
0
votes
0 answers

Is it possible to change the SQL_MODE for only one user only in MySQL?

Is there a way to change the SQL_MODE for only one user in MySQL? I know I can change the SQL_MODE for a connection by executing the following query SET SQL_MODE = ''; But the idea here is to change it always without having to set it every time. I…
Mike
  • 2,735
  • 11
  • 44
  • 68
0
votes
2 answers

Emacs -nw with sql-mode does not ask password on minibuffer

I'm using emacs on a console (emacs -nw). I use sql-mode, and when connecting to postgresql, it asks me to enter a password on a buffer, where password is visible. If I customize-group and set the password option in sql-postgre-login-params list,…
quimm2003
  • 871
  • 6
  • 8
0
votes
0 answers

STRICT_TRANS_TABLES : Is there a performance interest?

I am not able to find a good article which can say STRICT_TRANS_TABLES is best or not for performance (insert)? More generally, if you have a good article which explain in terms of performance the different sql mode... I am interested in.
Robin
  • 15
  • 1
  • 6
1 2 3 4 5 6
7