I'm using LOAD DATA LOCAL INFILE
, to fill a table and to try it I use a text like this:
kffokwofkwf "hostname"
ksakosak "IP" kdosko
_ "mac_eth"____
______ "mac_wifi"_
Which I have in my table 5 fields:
(ID AUTOINCREMENT, HOSTNAME,IP.MAC_ETH_,MAC WIFI)
When doing the LOAD DATA LOCAL INFILE
, it keeps everything in the different fields, that is, it seems that it does not recognize the ENCLOSED BY '"'
Someone who can guide me?
My code is as follows:
load data local infile '/listado1.txt'
into table computadora
FIELDS ENCLOSED BY '"' TERMINATED BY '\n'
LINES TERMINATED BY '\n' (HOSTNAME,IP,mac_eth,mac_wifi) ;