Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Stata & Databases


From   Philippe Glaziou <glaziou@pasteur-kh.org>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Stata & Databases
Date   Mon, 3 Mar 2003 18:58:38 +0700

Giovanni Vecchi <vecchi@economia.uniroma2.it> wrote:
> I have been asked about a convenient way of transferring data
> from Stata to external databases (say, Oracle) and viceversa.


stata -> sql database

   You may check the package -outdat- from ssc. 
   

sql database -> stata

   sql database=# COPY [table] TO '/tmp/filename';

   I usually process '/tmp/filename' with awk to replace tabs and
   spaces with a comma delimiter, and then -insheet-
   '/tmp/filename' in stata. I find this procedure convenient.


-- 
Philippe Glaziou
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index