I am able to extract data from our library database with specialized tools developed by the vendor. I can extract to a tab delimited file, csv, etc. I extract titles, authors, purchase orders and that kind of stuff. The files are created using wordpad, notepad (windows system)
However, if I extract to a csv file, the last data field has a comma at the end. For example:
PO-123,QA 123,Learning MySQL, Miller, John,
I can't figure out how to load the file to a table and take into account the comma at the end.
If I create a tab delimited file, it appears a tab is placed at the end of the line but I can't actually see it, I'm assuming since a comma is placed at the end of a CSV file. I tried loading using various lines terminated by variations and nothing with no luck, except if I don't get a syntax error the data is whackie, and not in the correct place.
I have attempted to load the files about 22 thousand times now, with no luck.
My first field in the table is the primary key auto_increment. I added NULL to the front of every line, but it doesn't appear to work as expected.
I have spend many hours searching websites for the answer. I just don't understand how to load a file so it takes into account that the first column in the table is a primary key with auto_increment and the extra tab or comma at the end of each line.
Thanks.
However, if I extract to a csv file, the last data field has a comma at the end. For example:
PO-123,QA 123,Learning MySQL, Miller, John,
I can't figure out how to load the file to a table and take into account the comma at the end.
If I create a tab delimited file, it appears a tab is placed at the end of the line but I can't actually see it, I'm assuming since a comma is placed at the end of a CSV file. I tried loading using various lines terminated by variations and nothing with no luck, except if I don't get a syntax error the data is whackie, and not in the correct place.
I have attempted to load the files about 22 thousand times now, with no luck.
My first field in the table is the primary key auto_increment. I added NULL to the front of every line, but it doesn't appear to work as expected.
I have spend many hours searching websites for the answer. I just don't understand how to load a file so it takes into account that the first column in the table is a primary key with auto_increment and the extra tab or comma at the end of each line.
Thanks.
Comment