My project requires me to extract data from a commercial system through their reporting system, which will write the data to a csv file. The problem that I have is that some of the fields are double quoted, but others are not. When I try to load the data into MySQL, it indicates that I have more data than I have input columns.
If I take the data and manually put double quotes before and after the comma delimiter, but leave the fields alone where it is already double quoted, VB will work fine and load it.
How can I programmatically put double quotes where they need to be?
Here is my data:
John's Auto Pros,1795 E. Valley Parkway,"Escondido, CA. 92027",Phone - 760-741-2076 Fax - 760-741-6993,Current Technician Assignments,Report Date : 08/10/2021,Technician,"Charged Hours","Pay Hours","Invoice / Estimate #",Hat Number,Job,Description,Status,Cody Carter,,RO,Complete AAA 40 point Inspection,0,0,COMPLETED,24236,Totals:,15.77,15.77,Grand Total Charged Hours: 95.85,Grand Total Pay Hours: 94.85,Page 1 of 1,"(c) 2012 Mitchell Repair Information Company, LLC CurTechAssig.rpt 07.10.12"
Thanks in advance for your help.
If I take the data and manually put double quotes before and after the comma delimiter, but leave the fields alone where it is already double quoted, VB will work fine and load it.
How can I programmatically put double quotes where they need to be?
Here is my data:
John's Auto Pros,1795 E. Valley Parkway,"Escondido, CA. 92027",Phone - 760-741-2076 Fax - 760-741-6993,Current Technician Assignments,Report Date : 08/10/2021,Technician,"Charged Hours","Pay Hours","Invoice / Estimate #",Hat Number,Job,Description,Status,Cody Carter,,RO,Complete AAA 40 point Inspection,0,0,COMPLETED,24236,Totals:,15.77,15.77,Grand Total Charged Hours: 95.85,Grand Total Pay Hours: 94.85,Page 1 of 1,"(c) 2012 Mitchell Repair Information Company, LLC CurTechAssig.rpt 07.10.12"
Thanks in advance for your help.