> I'm trying to work out how to import Checkpoint FW1 firewall logs into > mysql. > > Each line of the logs consists of 27 space deliminated fields. > Of the 27 fields, I want to ignore about 11 of these fields when I do > the LOAD command on the log file. > > I've already figured out I want to use: > > TERMINATED BY ' ' to indicate that the fields are space deliminated > LINES TERMINATED BY '\n' to indicate that each line is terminated by > new line....again I'm thinking here that > I may need to use a '\r' instead. > > Question: how do I get mysql to ignore specified fields? I will be > using a LOAD file to contain the load parameters and that the field > options are top to bottom for fields left to right. > > **When I come to a field I want mysql to ignore do I just use this > parameter? > IGNORE
You can ignore a certain number of rows with LOAD DATA, but not columns. Best you can probably do is insert it into a table with all of the fields you want, then either drop those columns, or INSERT INTO ... SELECT and only get the columns you want in a second table. ---John Holmes... --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php