Open Glavin001 opened 9 years ago
I used http://www.sequelpro.com/ instead.
Having some trouble with the CALENDAR_DT
field in sale
table.
Using Sequel Pro is working great. We will not be writing a SQL script to load.
Here was my work-in-progress script:
LOAD DATA LOCAL INFILE '~/Downloads/SobeysData/SALES_Header.csv'
INTO TABLE `sale`
LINES TERMINATED BY '\n'
(transactionRk, @calendarDt, `time`, itemSk, retailOutletLocationSk, @posTerminalNo, @cashierNo, itemQuantity, itemWeight, salesUOMCode, sellingRetailAmount, promoSalesCode, @stapleItemFlag, regionCode, customerSk)
SET `date` = STR_TO_DATE(@calendarDt, '%d%b%Y');
See http://stackoverflow.com/a/13372912/2578205