Statalist


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

st: AW: -merge- in version11 fails to sort automatically


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: AW: -merge- in version11 fails to sort automatically
Date   Mon, 7 Dec 2009 16:21:49 +0100

<> 


-merge 1:1- performs its -checksort- as one of its first tasks. So -set
trace on- and report what happens there...



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Padmakumar
Sivadasan
Gesendet: Montag, 7. Dezember 2009 16:16
An: [email protected]
Betreff: st: -merge- in version11 fails to sort automatically

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/


*
*   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