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]

st: merge problem


From   Alberto R Osella <arosella@irccsdebellis.it>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: merge problem
Date   Tue, 12 Mar 2013 12:26:38 +0100

Hi All,
I'm using Stata 12.1 on W7.
I'm trying to perform a consecutive merge.

I've tried:

use E:\Alberto\Papers\WorkingPapers\Nutriepa\Nutriepa_Database\Nutriepa_Resto\Nutriepa_Dati.dta
drop dieta

merge 1:1 codice using "E:\Alberto\Papers\WorkingPapers\Nutriepa\Nutriepa_Database\Nutriepa_Resto\Nutriepa_Quest_Generale.dta"
drop _merge

merge 1:1 codice using "E:\Alberto\Papers\WorkingPapers\Nutriepa\Nutriepa_Database\Nutriepa_Resto\Nutriepa_Quest_Generale.dta"
drop _merge

save E:\Alberto\Papers\WorkingPapers\Nutriepa\Nutriepa_Database\Nutriepa_Resto\Nutriepa_Generale.dta, replace
clear

Also:
use E:\Alberto\Papers\WorkingPapers\Nutriepa\Nutriepa_Database\Nutriepa_Resto\Nutriepa_Dati.dta
drop dieta



merge 1:1 codice using "E:\Alberto\Papers\WorkingPapers\Nutriepa\Nutriepa_Database\Nutriepa_Resto\Nutriepa_Quest_Generale.dta"
drop _merge

save E:\Alberto\Papers\WorkingPapers\Nutriepa\Nutriepa_Database\Nutriepa_Resto\Nutriepa_Generale.dta, replace
clear
use E:\Alberto\Papers\WorkingPapers\Nutriepa\Nutriepa_Database\Nutriepa_Resto\Nutriepa_Generale.dta


merge 1:1 codice using E:\Alberto\Papers\WorkingPapers\Nutriepa\Nutriepa_Database\Nutriepa_Resto\Nutriepa_BMI_Dieta.dta save E:\Alberto\Papers\WorkingPapers\Nutriepa\Nutriepa_Database\Nutriepa_Resto\Nutriepa_Generale.dta, replace
clear

But the code doesn't work. When Stata executes the second merge, it always gives me the same error:
_merge already defined.
Can you help me?
Thanks.


--
Alberto R. Osella, MD, PhD
Laboratorio di Epidemiologia e Biostatistica
IRCCS Saverio de Bellis
Via Turi, 27
70013 Castellana Grotte (BA)
Italia
Tel:    +39 0804994655
Fax:    +39 0804994650
e-mail: arosella@irccsdebellis.it


____________
Controllo virus eseguito da G Data AntiVirus
Versione: AVA 22.8413 del 12.03.2013
Info nuovi virus: www.antiviruslab.com

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