List:General Discussion« Previous MessageNext Message »
From:Christian Mack Date:June 20 1999 9:32pm
Subject:Re: LOAD DATA INFILE and multiline fields
View as plain text  
Chris Lott wrote:
> 
> I am trying to format a file for loading into a MySQL table using the LOAD
> DATA INFILE COMMAND. The data file currently has info as noted below,
> intended for a table with format: (edate DATE, enote LONGTEXT, author
> VARCHAR (80), title VARCHAR (100), quote LONGTEXT):
> 
> 6/18/99
> ~~~
> <P>A multi-paragraph note field to be inserted into a longtext
> <P>The rest of the paragraph
> ~~~
> Doe, John J.
> ~~~
> The Pickwick Papers Redux
> ~~~
> <P>A multi-paragraph note filed to be inserted into a longtext field.
> <P>Another paragraph of the quote field
> <P>etc.
> ~~~
> 
> The problem seems to be the multiline fields...
> 
> c

Hi Chris

Try the following (not tested!):
LOAD DATA INFILE 
	'/path/to/data.file' 
INTO TABLE
	table
FIELDS 
	TERMINATED BY '\n~~~\n'
LINES 
	TERMINATED BY ''

Tschau
Christian

Thread
ERROR 1130Alan Chan18 Jun
  • LOAD DATA INFILE and multiline fieldsChris Lott18 Jun
  • Re: ERROR 1130Sasha Pachev18 Jun
  • Re: LOAD DATA INFILE and multiline fieldsChristian Mack21 Jun