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, statalist.org is already up and running.


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

Re: st: merging in data directly from ODBC sources


From   "Dimitriy V. Masterov" <dvmaster@gmail.com>
To   Statalist <statalist@hsphsun2.harvard.edu>
Subject   Re: st: merging in data directly from ODBC sources
Date   Sun, 10 Feb 2013 10:42:44 -0800

You can do the join in SQL and then pull the data down with the -odbc
load, exec()- command. While somewhat quicker, this does not provide
the information on overlap that the merge command does.

If you have a pre-existing sql file that you don't want to paste into
your Stata do-file, you might like this:

http://stackoverflow.com/a/12272627/1187671

DVM

On Sat, Feb 9, 2013 at 8:21 PM, László Sándor <sandorl@gmail.com> wrote:
> Hi all,
> I am working with many-many ODBC tables, with many different variables
> but sharing a common identifier. Is there a quicker way to build
> datasets of variables corresponding to the identifier than loading
> each table separately, saving it in Stata format, and then merge over
> these Stata files?
>
> I found no such use in the help file, so I am afraid this does not
> exist. Would it require anything in ODBC/SQL, or Stata would need to
> be smart with such a merge, which is just not implemented?
>
> Thanks,
>
> Laszlo
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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