Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
josh.cusano
Starting Member
1 Post |
Posted - 2012-07-30 : 18:32:46
|
| Hey!I'm a new SQL user. I recently created a database using MySQL to import a daily .csv flat file to do some data modeling. The files are large - 50 - 75Mb, with 300,000 to 500,000 rows of data. I've been trying to use the DATA LOAD INFILE script but issues occur after a few thousand lines. Many of the table columns have different data types - VARCHAR, INT, DECIMAL, DATE. I'm assuming the data is not being properly delimited or the lines are not terminating properly because after a few thousand lines or more I get an error saying that a field (again, thousands of lines down) is being populated by the wrong data type. I do not have this issue with small files (usually less tha 1,00 rows).Script used - LOAD DATA INFILE '/test2.csv' INTO TABLE logdb FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' (field1, field2, ...);I've tried this with '\r' and '\r\n' too.Any help is appreciated! |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|
|
|
|