Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: mysql to stata

From   Tyler Frazier <>
Subject   Re: st: mysql to stata
Date   Tue, 13 Jul 2010 13:00:47 -0400

OK it seems this was the solution

now stata can find mysql with 'odbc list'

here is the driver for future inquiries


I then run the following command

. odbc load, dsn("accra") table("annual_employment_control_totals")

but get this error

The ODBC driver reported the following diagnostics
[MySQL][ODBC 3.51 Driver][mysqld-5.1.48-community]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 '"annual_employment_control_totals"' at line 1

I double checked the username and pwd -- looks right

any ideas?


On Tue, Jul 13, 2010 at 12:29 PM, Tyler Frazier <> wrote:
> What is the best way to connect stata to a mysql database .. I added
> tosql for export, but there are still conversion errors in the type
> (int, double, float, char, etc...) and it seems to be resulting errors
> in my model.  Also, I would like to import from MySQL edit and export
> again.  I have tried the odbc command but mysql is not recognized, Im
> working through the drivers but wanted to give a quick email to get
> some feedback confirming this is the right direction or not.  Thanks!
> Ty
> *
> *   For searches and help try:
> *
> *
> *

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index