0

We have a data table with incorrect data in a date date . Now I get a warning about that and while this is not a bug I like to be able to query for the rows with that wrong column values.

Unfortunately this column is part of the primary key, so the next worry seems to be the removal of that wrong data...

The SQL modes in effect are: STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

Is there a query that translates to show me the rows with warnings? And how to later remove the rows in question?

asked Oct 24, 2022 at 9:04
2
  • 1
    Now I get a warning about that Speaking about errors and warnings you must provide complete error message text. We cannot predict what type of the incorrectness you deal with. Also provide complete CREATE TABLE script and an example of problematic rows (if possibe in INSERT INTO form, or at least as CLI output of the SELECT with small LIMIT). Commented Oct 24, 2022 at 10:21
  • 1
    Let's see the value. Let's see SHOW CREATE TABLE. What is preventing the "query for the rows with that wrong column values."? Do you get an error, or what? Commented Oct 24, 2022 at 15:22

1 Answer 1

0

Was actually totally misled. Did match on date in the wehre clause wrong and that resulted in a wrong datetime value. So no issue after a co-worker opened my eyes...

answered Nov 7, 2022 at 5:53

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.