Reputation: 45
I am being given a .csv file that has 18 columns of useless data, then 10 columns of useful data and then another column of useless data. Is there anyway to just grab the 10 columns of useful data and just skip over the rest? I just want to start of reading the file at column 19 and finish at column 29.
Upvotes: 1
Views: 14000
Reputation: 626
And with MySQL it would be :
LOAD DATA
INFILE file.csv
INTO TABLE test_sqlldr
APPEND
FIELDS TERMINATED BY ';'
TRAILING NULLCOLS
(
@ignore,
@ignore,
...
@ignore,
col19,
col20,
...
col29
)
Upvotes: 0