List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:November 6 2002 5:46pm
Subject:Re: load data infile syntax
View as plain text  
At 12:38 -0500 11/6/02, Vivian Wang wrote:
>I tried,
>db.query("load data infile '/data/winshare/experian/test' into table 
>d_adds fields terminated by '' escaped by '\\\\' lines terminated by 
>'\\n'");
>db.query("load data infile '/data/winshare/experian/test' into table 
>d_adds fields terminated by '' escaped by '\\\\' lines terminated by 
>'\n'");
>
>both no error, but my data still shift 1 byte to left.

What do you mean by "shift 1 byte to left".  What's an example of your
input data and how it actually ends up in MySQL?

>
>Also, I tried from mysql,
>mysql>load data infile '/data/winshare/experian/test' into table 
>d_adds fields terminated by '' escaped by '\\' lines terminated by 
>'\n';
>no error, but my data still shift to left.
>
>mysql>load data infile '/data/winshare/experian/test' into table 
>d_adds fields terminated by '' escaped by '\' lines terminated by 
>'\n';
>PAGER set to stdout
>     '> '
>     -> ;
>ERROR 1083: Field separator argument is not what is expected. Check the manual

That last statement is illegal, because '\' needs to be '\\'.

Thread
load data infile syntaxVivian Wang5 Nov
  • Re: load data infile syntaxPaul DuBois6 Nov
    • Re: load data infile syntaxVivian Wang6 Nov
      • Re: load data infile syntaxPaul DuBois6 Nov
        • Re: load data infile syntaxVivian Wang6 Nov
          • Re: load data infile syntaxPaul DuBois6 Nov
            • Re: load data infile syntaxVivian Wang6 Nov
              • Re: load data infile syntaxPaul DuBois6 Nov
RE: load data infile syntaxAlan R Anderson7 Nov