Category Archives: Stata

Incorporating SQL in Stata code

Here is a snippet of code showing how one can include SQL in Stata code (I assume that the ODBC connection has been set up). #delimit ; local sql ” SELECT * FROM director_bio.directorship_results WHERE non_match AND start_date < date_filed … Continue reading

Posted in PostgreSQL, Stata, Uncategorized | Tagged , , | Leave a comment

Executing SQL in a file against an ODBC source from Stata

I recently discovered that Stata has good support for OBDC. While the built-in functionality includes odbc sqlfile, a “batch job alternative to odbc exec,” there seems to be no equivalent alternative for odbc load (even though odbc load is surely … Continue reading

Posted in Mac, PostgreSQL, Stata | Leave a comment

Pulling data into Stata from PostgreSQL in Mac OS X

The following is perhaps of interest to Stata users. This was pretty easy to install on my (OS X) laptop (a few tweaks to the Makefile, then the usual “make; sudo make install”). I suspect one could get it to … Continue reading

Posted in Mac, PostgreSQL, Stata | 3 Comments