> -----Original Message----- > From: John Berman [mailto:[EMAIL PROTECTED] > Sent: Friday, February 11, 2005 16:22 > To: 'Tom Crimmins' > Cc: mysql@lists.mysql.com > Subject: RE: Remove spaces > > The error is simply: > > [JGSGB 4.1 Host] ERROR 1064: You have an error in your SQL > syntax; check the > manual that corresponds to your MySQL server version for the > right syntax to > use near 'update mc_census set surname = trim(surname)' at line 6
line 6 ??? Something is wrong here. Are you excuting this from the mysql client? Something is getting sent to the server before this. Put a semi-colon before your statement and it will probably work, but I don't know exactly what the problem is. > > > John B > > -----Original Message----- > From: Tom Crimmins [mailto:[EMAIL PROTECTED] > Sent: 11 February 2005 22:16 > To: [EMAIL PROTECTED] > Cc: mysql@lists.mysql.com > Subject: RE: Remove spaces > > > Please post the error because this looks correct. > > --- > Tom Crimmins > Interface Specialist > Pottawattamie County, Iowa > > > -----Original Message----- > > From: John Berman [mailto:[EMAIL PROTECTED] > > Sent: Friday, February 11, 2005 16:05 > > To: 'Homam S.A.' > > Cc: mysql@lists.mysql.com > > Subject: RE: Remove spaces > > > > Thanks for this > > > > > > I did this: > > > > update mc_census set surname = trim(surname) > > > > however it fails with a syntax error ? > > > > I'm on 4.1 > > > > Regards > > > > John B > > > > -----Original Message----- > > From: Homam S.A. [mailto:[EMAIL PROTECTED] > > Sent: 11 February 2005 21:29 > > To: mysql@lists.mysql.com > > Subject: Re: Remove spaces > > > > update your_table > > set your_field = trim(your_field) > > > > > > --- John Berman <[EMAIL PROTECTED]> wrote: > > > > > Hi > > > > > > I have a table with a number of fields > > > > > > The table is already populated, however some entries > > > have got spaces both > > > before and after the data. > > > > > > Future imports into the table will have the spaces > > > removed, however im still > > > stuck with my extra spaces. > > > > > > I have checked the Mysql manual but could not figure > > > out how to remove the > > > extra spaces that are already in the dbase ? > > > > > > > > > Any help appreciated. > > > > > > Regards > > > > > > > > > John B > > > > --- Tom Crimmins Interface Specialist Pottawattamie County, Iowa -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]