Hi Im struggling with an option to import a CSV file into my MSQL database from within Robotask. Im using the latest 7.3.0.0964.
Attached is the CSV file im trying to import. Seems I cant use "INSERT INTO" with robotask because MySQL doesent support ADO or something.?.
Ive created a PHP file successfully with the following SQL code:
"$sql = "INSERT INTO simmons_pricechange (Location, SiteName, PanelID, PriceChangeTime, Grade, Name, OldPriceCash, NewPriceCash, CashPriceDifference, OldPriceCredit, NewPriceCredit, CreditPriceDifference, PriceChanged)
VALUES('" . implode("','",$row) . "')";"
However this is what I have in Robotask which fails because it doesent support INSERT INLINE:
"LOAD DATA INFILE 'C:\Support\SimmonsPrices\negw_dpcr_5006__20180722_204073114.csv'
INTO TABLE simmons_pricechange
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'
IGNORE 1 ROWS"
Can someone help me write a way to read from the CSV file and import it into my MySQL database? Can it be done?
Thanks in advance.
Tony