Gossamer Forum
Home : General : Databases and SQL :

strange table display after "load"

Quote Reply
strange table display after "load"
Hi, I just noticed a strange thing while using mysql (running in console mode). I LOADed data from a text file and then displayed the contents using SELECT, but the first column of data seems truncated on display and the rest are fine. However, if I only select the first column, it displays correctly. So the data gets in, but displays strangely.

However, if I add a row to a table one at a time using INSERT and then display, everything looks ok.

Has anyone seen the same thing? What can I do to see the data correctly?
Quote Reply
Re: [deepdebt] strange table display after "load" In reply to
Ok, after digging around, I've found a solution!

Using a "LINES TERMINATED BY '\r\n' in my LOAD DATA INFILE statement, all is fine now.

LOAD DATA INFILE "filename" INTO TABLE tablename