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: merging multiple files in stata

From   daniel klein <>
Subject   Re: st: merging multiple files in stata
Date   Thu, 22 Mar 2012 16:39:02 +0100


note that if you assume Stata 11 syntax for -merge- you do not need
the -sort-ing part, because as of Stata 11 the datasets to be -merge-d
do no longer need to be sorted (one of my favorite enhancements in


using old -merge- syntax, as you are doing, allows multiple files to
be -merge-d. The syntax digram reads

merge [varlist] using filename [filename ...]

so after preparing all your files you could try

use temp_physn.dta
merge bene_id mnth using temp_hsps.dta temp_opmnth.dta

*   For searches and help try:

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