Statalist


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

st: -merge- in version11 fails to sort automatically


From   Padmakumar Sivadasan <[email protected]>
To   [email protected]
Subject   st: -merge- in version11 fails to sort automatically
Date   Mon, 7 Dec 2009 09:15:57 -0600

Hello everyone,

This is a question about the –merge- command in Stata version11. I use
Stata/MP Version 11.

Version11, Manual [D] states on page 405
“You are not required to have the dataset sorted before using merge,
however, because merge will sort behind the scenes, if necessary. If
the using dataset is not sorted, then a temporary copy is made and
sorted to ensure that the current sort order on disk is not affected.”

 I ran the following command using the new merge syntax and obtained
an error notification

merge 1:1 cik fyear using compustat
using data not sorted
r(5);

I got around the problem by sorting and saving the two datasets before
merging them (as I would do in Stata 10). I would like to use Stata
11’s merge command and avoid the extra sort steps. Could someone
please point out why –merge- fails to sort automatically in this
instance?



Padmakumar

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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