This is my first post on this list, so bear with me. I have a text file with 10,000 stories in it (about 130 MB). I would like to break it up into 10,000 separate files and am trying to figure out a way to feed it into a MYSQL database.
I have set up the database with the pertinent fields, except the individual stories do not necessarily follow the same pattern. For instance, almost all of them have: Header Publication section edition date page number headline byline story all separated by two returns, with each overall story separated by four returns. Now, I can load the file using fields terminated by "\n\n" and lines terminated by "\n\n\n\n", but if, for instance, a story does not have a byline, I'm in trouble. It will happily put the story data in the byline field. Am I out of luck, or can I specify text to look for in specific fields as the file is being loaded, i.e. the date field is always preceded by "Date:" and if no "Date:" is found, skip the field? I'm using 3.23.44 -- Greg Peretti web developer www.abqjournal.com (505) 823-3888 ----------------------------------- The web of our life is of a mingled yarn, good and ill together. - William Shakespeare --------------------------------------------------------------------- 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