Amy
Amy

Reputation: 193

MySQL - Search for entries with 3 decimal places

I have a table with 7.5 million entries, and while importing some of the data a few of the column breaks messed up and the first digit of a column ended up stuck onto the end of the previous column.

For example, on a row it should say ELWS=123.44 and t2=17.00, and instead it read in ELWS=123.441 and t2=7.00.

This only happened in a few places.

Is there some way to search for the entries where ELWS ended up with 3 decimal places? Also, all fields are double type.

Upvotes: 1

Views: 1025

Answers (1)

PinnyM
PinnyM

Reputation: 35541

SELECT * FROM someTable
WHERE (ELWS * 1000) % 10 != 0

SQLFiddle here

Upvotes: 2

Related Questions