El 21 de marzo de 2012 23:11, Diego Uribe Gamez <diego.uribe.ga...@gmail.com> escribió:
> create table id_481031 stocks (id integer AUTO_INCREMENT NOT NULL PRIMARY > KEY,id_unidad bigint NOT NULL, > ip_unidad bigint NOT NULL, fecha numeric(7, 1) NOT NULL) > > Traceback (most recent call last): > File "sqlinteligent.py", line 42, in <module> > cursor.execute(creartabla) > File "/usr/lib/pymodules/python2.6/MySQLdb/cursors.py", line 166, in > execute > self.errorhandler(self, exc, value) > File "/usr/lib/pymodules/python2.6/MySQLdb/connections.py", line 35, in > defaulterrorhandler > raise errorclass, errorvalue > _mysql_exceptions.ProgrammingError: (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 'stocks (id integer AUTO_INCREMENT NOT NULL > PRIMARY KEY,id_unidad bigint NOT NULL' at line 1") Sólo hay que leer el error para darse cuenta que está mal escrita la consulta. -- Hyperreals *R: http://ch3m4.org/blog Quarks, bits y otras criaturas infinitesimales _______________________________________________ Python-es mailing list Python-es@python.org http://mail.python.org/mailman/listinfo/python-es FAQ: http://python-es-faq.wikidot.com/