From: Michael Dykman Date: October 15 2009 3:39pm Subject: Re: Inserting csv List-Archive: http://lists.mysql.com/mysql/219061 Message-Id: <814b9a820910150839u15ca6d15q379efbb18d9cf3f4@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable If you could show us the table structure (SHOW CREATE TABLE membership), we could easily correctly the query.. you seems to have some data among your field names... If the question is about the CSV converter, you will have to ask them. - michael dykman On Thu, Oct 15, 2009 at 11:26 AM, Patrice Olivier-Wilson wrote: > Newbie question, please. > > I have a csv file of 950 records, 20 fields. > > I used this converter > http://csv2sql.evandavey.com/ > > and copied/pasted insert code into SQL in phpMyAdmin > > and got this error > > > SQL query: > > INSERT INTO membership( =A0`members_ID` , =A0`updated` , =A0`notes` , > =A0`preferred_mail_street` , =A0`preferred_mail_csz` , =A0`first_name` , > =A0`last_name` , =A0`street` , =A0`city` , =A0`state` , =A0`zip` , =A0`lo= cation_code` , > =A0`property` , =A0`camp_street` , =A0`camp_city` , =A0`camp_zip` , `memb= er_year` , > =A0`director` , =A0`email` , =A0`camp_phone` , =A0`20` , =A0`21` , =A0`22= ` , =A0`23` ) > VALUES ( > > '', =A0'', =A0'', =A0'', =A0'', =A0'xxx', =A0'xxxx', =A0'102 Summer St', > =A0'Dover-Foxcroft', =A0'xx', =A0'04426', =A0'B', =A0'M15_L1_S20', =A0'Mi= ll Brook', > =A0'Bowerbank', =A0'', =A0'', =A0'', =A0'', =A0'', =A0'', =A0'', =A0'', = =A0'' > ); > > MySQL said: > > #1054 - Unknown column '20' in 'field list' > > Actually the first time, it was column 21, so to trouble shoot, I removed > that column from csv file and field name in phpMyAdmin. > > > camp_phone should be the last field but > `20` , =A0`21` , =A0`22` , =A0`23` ) > is there too... > Any assistance most appreciated! > > I checked the file and didn't see any odd entries after the camp_phone > field. > > > > > > -- > Patrice Olivier-Wilson > 888-385-7217 > http://biz-comm.com > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: =A0 =A0http://lists.mysql.com/mysql?unsub=3Dmdykman@gmail= .com > > --=20 - michael dykman - mdykman@stripped Don=92t worry about people stealing your ideas. If they=92re any good, you=92ll have to ram them down their throats! Howard Aiken