我试图将文件数据加载到数据库表中。插入某个地方时它会破碎,请有人告诉我如何找出它正在破坏的线路?
这是我的功能:
LOAD DATA LOCAL INFILE 'filename' INTO TABLE gtac7_rns
FIELDS TERMINATED BY '|'
LINES STARTING BY 'GTAC-LOGS:'
IGNORE 0 LINES (EntryTS,UserName,CmdAuthorized,CmdType,Cmd,DeviceIP,DevicePort,SessionSource,DomainName,DomainId,ServerID,BindIP,ServerPort,Service,CmdArgs,PrivLvl,TaskId) set DeviceIP = INET6_ATON(DeviceIP), SessionSource = INET6_ATON(SessionSource), BindIP = INET6_ATON(BindIP),Cmd = REPLACE(Cmd, '#', '|')
答案 0 :(得分:0)
如果它不是一个大文件,你可以尝试在notepad ++中替换'\ n'