MySQL Forums
Forum List  »  Newbie

Re: Structure Type Text
Posted by: Phillip Ward
Date: September 01, 2015 05:16AM

Quote

I have imported a .CSV file into a database
You say "CSV file", I immediately think "MS Excel", which is just chock full of "helpful" features that can completely foul up your data.

First things first. Check that the CSV file really looks the way you think it should. Open it in [something like] Notepad. Make sure it looks right there. (Excel can "helpfully" format things to "look" right on screen but that are wildly different in the physical file).

Then check the definition of the table you're loading ("show create table abc \g").

If any of your fields are defined as Integer (or any of the *Int variation), then MySql will "try" to convert the incoming data into valid numbers - by dropping any the letters! This would explain your "03" becoming "3", your "8Y" becoming "8".

Regards, Phill W.

Options: ReplyQuote


Subject
Written By
Posted
August 28, 2015 03:26AM
August 28, 2015 10:36AM
Re: Structure Type Text
September 01, 2015 05:16AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.