Data cleaning: Difference between revisions

Jump to navigation Jump to search
mNo edit summary
Tags: Mobile edit Mobile web edit
Tags: Mobile edit Mobile web edit
Line 263: Line 263:
* If the data was imported from Excel, you should notice the 15 digit precision issue.
* If the data was imported from Excel, you should notice the 15 digit precision issue.


=== Check if the column value is integer ===
=== Check if the column value is numeric ===
MySQL:  
MySQL:  


Line 270: Line 270:
* [https://stackoverflow.com/questions/75704/how-do-i-check-to-see-if-a-value-is-an-integer-in-mysql How do I check to see if a value is an integer in MySQL? - Stack Overflow]
* [https://stackoverflow.com/questions/75704/how-do-i-check-to-see-if-a-value-is-an-integer-in-mysql How do I check to see if a value is an integer in MySQL? - Stack Overflow]


Check if a value is integer which may contains comma and dot symbols e.g. 1,234.567 or 3.414
* Find the records which the value of `my_column` is numeric values entirely {{code | code = SELECT * FROM `my_table` WHERE `my_column` REGEXP '^[0-9,\.]+$'}}


Check if a value is NOT integer
Check if a value is NOT integer