Re: LOAD DATA INFILE Syntax error

2009-06-29 Thread Ralph Kutschera
Johnny Withers schrieb: Group is a keyword in mysql: You need to put backticks around it in your statement: | LOAD DATA INFILE 'test.csv' INTO TABLE table | FIELDS TERMINATED BY ',' | LINES STARTING BY '' TERMINATED BY '\n' | (Page, Device, `GROUP` , ItemID, Item, Value); Ooookay. Thank

Re: LOAD DATA INFILE Syntax error

2009-06-29 Thread Johnny Withers
Group is a keyword in mysql: You need to put backticks around it in your statement: | LOAD DATA INFILE 'test.csv' INTO TABLE table | FIELDS TERMINATED BY ',' | LINES STARTING BY '' TERMINATED BY '\n' | (Page, Device, `GROUP` , ItemID, Item, Value); On Mon, Jun 29, 2009 at 7:07 AM, Ralph K

LOAD DATA INFILE Syntax error

2009-06-29 Thread Ralph Kutschera
Hallo List! I have a CVS file which i would like to import to MySQL. The file header and an example: | Page,Device,Group,ItemID,Item,Value | Overview,General,Computer,513,OS,Linux The table has: | Create Table: CREATE TABLE `table` ( | `ID` int(11) NOT NULL auto_increment, | `Page` varch

RE: LOAD DATA INFILE Syntax

2005-12-12 Thread Logan, David (SST - Adelaide)
2005 8:12 AM To: mysql@lists.mysql.com Subject: LOAD DATA INFILE Syntax Hi mysql-list, I just installed, ++ | version() | ++ | 5.0.16-log | ++ Here is what I am testing out: (simple table and data) % echo 'a b c d' > testfile mysql> CREATE

LOAD DATA INFILE Syntax

2005-12-12 Thread Elliot Kleiman
Hi mysql-list, I just installed, ++ | version() | ++ | 5.0.16-log | ++ Here is what I am testing out: (simple table and data) % echo 'a b c d' > testfile mysql> CREATE TABLE `test` ( -> `fe` VARCHAR( 2 ), -> `fi` VARCHAR( 2 ), -> `fo` VARCHAR( 2

Re: LOAD DATA INFILE Syntax Error

2005-09-26 Thread Jason Ferguson
Okay, now I get it. I was using the 4.1 series. Looks like an upgrade is in order. Jason On 9/26/05, Jasper Bryant-Greene <[EMAIL PROTECTED]> wrote: > > Robert L Cochran wrote: > > http://mirror.tomato.it/mysql/doc/mysql/en/load-data.html > > There's a lot to read there for one small paragraph, s

Re: LOAD DATA INFILE Syntax Error

2005-09-26 Thread Jason Ferguson
I've been over that page before posting, with no luck. It might be an obvious error in syntax, but I can't figure it out. Jason On 9/26/05, Robert L Cochran <[EMAIL PROTECTED]> wrote: > > http://mirror.tomato.it/mysql/doc/mysql/en/load-data.html > > Bob Cochran > > > Jason Ferguson wrote: > > >I

Re: LOAD DATA INFILE Syntax Error

2005-09-26 Thread Jasper Bryant-Greene
Robert L Cochran wrote: http://mirror.tomato.it/mysql/doc/mysql/en/load-data.html There's a lot to read there for one small paragraph, so from the above link: "Before MySQL 5.0.3, the column list must contain only names of columns in the table being loaded, and the SET clause is not supporte

Re: LOAD DATA INFILE Syntax Error

2005-09-26 Thread Robert L Cochran
http://mirror.tomato.it/mysql/doc/mysql/en/load-data.html Bob Cochran Jason Ferguson wrote: I am attempting to import a large file with data in this format: 1923158|GA|1996 Olympic Yachting Cauldron|park|Chatham|13|051 |320446N|0810502W|32.07944|- 81.08389Savannah With this command:

LOAD DATA INFILE Syntax Error

2005-09-26 Thread Jason Ferguson
I am attempting to import a large file with data in this format: 1923158|GA|1996 Olympic Yachting Cauldron|park|Chatham|13|051 |320446N|0810502W|32.07944|- 81.08389Savannah With this command: LOAD DATA LOCAL INFILE 'C:\\PHP\\FL_DECI.txt' INTO TABLE locations2 FIELDS TERMINATED BY '|' LINE

Re: LOAD DATA INFILE syntax

2003-07-03 Thread fab
I've found the rpm. fab a écrit : Hi and thanx :) I've found dbf2mysql and it should solve my prob. However, my linux server is a production server (web + mail) and none programmation environnement is installed on it (no gcc and so on) and i don't want to. So, could anyone send me the binary f

Re: LOAD DATA INFILE syntax

2003-07-03 Thread fab
Hi and thanx :) I've found dbf2mysql and it should solve my prob. However, my linux server is a production server (web + mail) and none programmation environnement is installed on it (no gcc and so on) and i don't want to. So, could anyone send me the binary for dbf2mysql ? I use Red-Hat 7.3 on

Re: LOAD DATA INFILE syntax

2003-07-02 Thread gerald_clark
1 will work. 2 will not work. 3 Use dbf2mysql. ( It should be in the downloads section on mysql.com ) fab wrote: Hi all, I'm quite new in mysql. Despite i've read a part of the doc, i can't fix my prob. Here is my question: I want to convert a DBASE IV file into mysql table: 1) Have i to convert

LOAD DATA INFILE syntax

2003-07-02 Thread fab
Hi all, I'm quite new in mysql. Despite i've read a part of the doc, i can't fix my prob. Here is my question: I want to convert a DBASE IV file into mysql table: 1) Have i to convert the dbf into flat file then use the LOAD DATA INFILE cmd ? or 2) Can i directly use the LOAD DATA INFILE cmd w

RE: load data infile syntax

2002-11-07 Thread Anderson, Alan R
>If the data contains "\", then database will automatically takes "\" >away and shift 1 byte left. >My data will mass up. That is why I still need "\" Does your data actually include backslash characters? If you want to import them as they are, you definitely don't want to ESCAPE BY them. Esca

Re: load data infile syntax

2002-11-06 Thread Paul DuBois
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

Re: load data infile syntax

2002-11-06 Thread Vivian Wang
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

Re: load data infile syntax

2002-11-06 Thread Paul DuBois
At 11:18 -0500 11/6/02, Vivian Wang wrote: This is my statement using python, db.query("load data infile '/data/winshare/experian/test' into table d_adds fields terminated by '' escaped by '\' lines terminated by '\n'"); Is python problem? not sure. Looks like what's happening is that Python it

Re: load data infile syntax

2002-11-06 Thread Vivian Wang
This is my statement using python, db.query("load data infile '/data/winshare/experian/test' into table d_adds fields terminated by '' escaped by '\' lines terminated by '\n'"); Is python problem? not sure. At 10:01 AM 11/6/2002 -0600, Paul DuBois wrote: At 10:03 -0500 11/6/02, Vivian Wang wrote:

Re: load data infile syntax

2002-11-06 Thread Paul DuBois
At 10:03 -0500 11/6/02, Vivian Wang wrote: I did my testing. If I use ESCAPED BY '\\', I got 1064, "You have an error in your SQL syntax near ''' at line 2" Using ESCAPED BY '\', then no error and result is fine. If the data contains "\", then database will automatically takes "\" away and shift

Re: load data infile syntax

2002-11-06 Thread Vivian Wang
I did my testing. If I use ESCAPED BY '\\', I got 1064, "You have an error in your SQL syntax near ''' at line 2" Using ESCAPED BY '\', then no error and result is fine. If the data contains "\", then database will automatically takes "\" away and shift 1 byte left. My data will mass up. That is

Re: load data infile syntax

2002-11-05 Thread Paul DuBois
At 14:38 -0500 11/5/02, Vivian Wang wrote: The syntac ESCAPED BY of load data infile is wrong in http://www.mysql.com/doc/en/LOAD_DATA.html. the [ESCAPED by '\\'] should be: [ESCAPED BY '\'] Why do you say that? - Before post

load data infile syntax

2002-11-05 Thread Vivian Wang
The syntac ESCAPED BY of load data infile is wrong in http://www.mysql.com/doc/en/LOAD_DATA.html. the [ESCAPED by '\\'] should be: [ESCAPED BY '\'] - Before posting, please check: http://www.mysql.com/manual.php (the manual