3

これはエラーをスローしています、私は理由を理解することができません、何かアイデアはありますか?

LOAD DATA LOCAL INFILE 'H:/Data/DB__Muni/data/msrb_AZ_short1.csv'
INTO TABLE import_mdrp FIELDS TERMINATED BY ';' LINES TERMINATED BY '\r\n' 
  ( 
    Issuer, cusip6, state, Issue,
    page_pointer, @var1, date_rng, cusip9, @var2,
    yield, Amt_Offer_Dlr, Amt_Offer_Per, Security_Description,
    Fitch, Moody, cusip_img, fitch_img, moody_img 
  )
SET maturity = STR_TO_DATE(@var2,'%m/%d/%Y') 
SET issue_date = STR_TO_DATE(@var1,'%m/%d/%Y') 
;
4

1 に答える 1

7

それ以外の

SET maturity = STR_TO_DATE(@var2,'%m/%d/%Y') 
SET issue_date = STR_TO_DATE(@var1,'%m/%d/%Y') 

試す

SET maturity = STR_TO_DATE(@var2,'%Y-%m-%d') 
SET issue_date = STR_TO_DATE(@var1,'%Y-%m-%d') 

更新1

SET maturity = DATE_FORMAT(STR_TO_DATE(@var2, '%m/%d/%Y'), '%Y-%m-%d'),
    issue_date = DATE_FORMAT(STR_TO_DATE(@var1, '%m/%d/%Y'), '%Y-%m-%d')
于 2012-11-08T01:22:07.380 に答える