Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: Stata to MySQL using ODBC


From   Orvalho Joaquim Augusto <[email protected]>
To   StataList <[email protected]>
Subject   st: Re: Stata to MySQL using ODBC
Date   Mon, 12 Nov 2007 14:17:25 +0200

Thank you

I knew this and it works fine the trouble is that I have a limit of 244
characters or something like that when I run the SQL command generated
from Stata with "odbc exec".

I were trying the approach of tosql but it makes a mess with the missing
data. So I will give a try to odbc insert as it does the to sql job.

By the way I am using Linux, iodbc and MySQL greatly.
 




On Mon, 2007-11-12 at 11:25 +0000, Dedman, Dan wrote:
> Hi
> 
> I have only done this using SQL Server, but the same should be possible to do for MySQL. You need an ODBC driver for MySQL:
> http://dev.mysql.com/downloads/connector/odbc/3.51.html
> 
> Then you register your MySQL database (Start - Control Panel - Administrative Tools - Data Sources (ODBC))
> 
> Once this is done, you can interact with the database using the Stata -odbc- command
> 
> Careful though - it is quite slow to insert records from Stata into the database.
> 
> Best Wishes
> 
> Dan
> 
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> Daniel Dedman
> Public Health Information Specialist/Analyst
> North West Public Health Observatory
> Centre for Public Health
> Castle House
> North street
> Liverpool L3 2AY
> 
> t: 0151 231 4552
> m: 07812 192578
> f: 0151 231 4515
> e: [email protected]
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> 
> 
> 
> Orvalho writes:
> >>Subject: st: from Stata to MySQL
> 
> I need a tool that could help me take some cases from my dataset to a
> database using sql.
> 
> I need that because it is more easier to write rules to clean the data
> in Stata than in database with SQL.
> 
> Thank you in Advance
> Orvalho J Augusto
> >>
> 
> 
> 


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index