List:General Discussion« Previous MessageNext Message »
From:Christian Mack Date:June 16 1999 6:39pm
Subject:Re: LOAD DATA !!
View as plain text  
"Sandrine C." wrote:
> 
> Hello just a little query :))
> i havethe mysql manual in front of me, but still be confuse!!
> i want to load the table 'organsime' from a file organisme_load.
> I create a file load where i call organsime_load ( and then all my other
> files for the other table.... but for the moiment i am just testing.)
> 
> so here is what I do:
> file load :
> 
> mysql essai_temp << !EOF
> LOAD DATA INFILE "./organisme_load" INTO TABLE organisme
>         FIELDS TERMINATED BY ',' ENCLOSED BY ''' ESCAPED BY '\'
>         LINES TERMINATED BY '\n';
> 
> !EOF/usr/bin/mysqladmin reload
> 
> and file organisme_load :
> NULL, 'CAFAL', 'Caisse d Alloc ', '1', 'public', 'Locale' , '1', '1', 'En
> Attente', '1994-02-04'NULL,
> 'CRCI', 'Chambre de Comm...', '2', 'public', 'Regionale' , '2', '2',
> 'Actif', ''
> 
> NULL, 'Orga Spé', 'Organisme Spécial !', '11', 'public', 'Regionale' ,
> '2',
> '2', 'Actif', ''
> 
> NULL, 'lola', 'l\'Organisme LOLMA...', '11', 'public', 'Regionale' , '2',
> '2', 'Actif', ''
> 
> comment faut il s 'y prendre??
> what should I do??

Hi Sandrine

Do you try to load a local file into mysql?
If yes, then you have to use the LOAD DATA LOCAL INFILE... syntax.
Also you should always give the full Path for INFILE and OUTFILE parameters.

BTW:
You didn't say, what error you get.

Tschau
Christian

Thread
LOAD DATA !!Sandrine C .16 Jun
  • Re: LOAD DATA !!Christian Mack16 Jun