Aaron DuBois wrote:
> This is my 1st use of the micronet so please let me know if my question
> is out of bounds.
>
> What's wrong with this statement?
>
> UPDATE tablename SET columnname="newdata" WHERE columnname="olddata";
>
> The column name I want to update is "E-mail" and the error message given
> is:
>
> ERROR 1064 (42000): 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 '-mail="haveman_at_berkeley.edu" where
> E-mail="hah15_at_columbia.edu"' at line 1
>
> I'd swear that the syntax is correct as per several online instructions
> and the MySQL online manual.
> I suspect that it is the name of the column that is causing this error.
> Any clues anyone?
>
Thanks all for your fast help.
The answer is....drum roll please.
NO "-" IN A TABLE COLUMN NAME.
Use ` ` around the E-mail part of the statement worked just fine.
Thanks again for all the help on this one.
-- Aaron DuBois Sociology Tech 489 Barrows Hall Mon-Fri 8:30am-12:30pm 510-643-9389 Department IST Security Officer Departmental Equipment Custodian ------------------------------------------------------------------------ The following was automatically added to this message by the list server: To learn more about Micronet, including how to subscribe to or unsubscribe from its mailing list and how to find out about upcoming meetings, please visit the Micronet Web site: http://micronet.berkeley.edu/ Messages you send to this mailing list are public and world-viewable, and the list's archives can be browsed and searched on the Internet. This means these messages can be viewed by (among others) your bosses, prospective employers, and people who have known you in the past.Received on Thu Sep 06 2007 - 11:15:44 PDT
This archive was generated by hypermail 2.2.0 : Thu Sep 06 2007 - 11:15:53 PDT