Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: merge multiple database


From   "Yun Liu" <[email protected]>
To   [email protected]
Subject   Re: st: merge multiple database
Date   Thu, 12 Apr 2007 17:50:13 -0400

Thanks, Nick. But that's not what I meant. I have three datasets: one
being the "master", the other two being the "using". I want to keep
certain variables from the first using dataset and some other
variables from the second using dataset.

Anyway, I can always merge them one by one if there is no easier way.

Yun

On 4/11/07, GUO Lei <[email protected]> wrote:
How about this: try to keep id and var1 from master dataset, and then merge
with the merging dataset, since the keep option here can only keep those
var's from merging rather than master dataset.
nick

>
>Hi, I am trying to merge multiple database and keep specific
>variables
>from each of the using files.
>I type "merge id using db1 db2, keep(var1 var2)".  var1 is in db1
>and
>var2 is in db2. But stata gives an error message: "variable var2 not
>found in using dataset." Please help. Thank you!
>*
>*   For searches and help try:
>*   http://www.stata.com/support/faqs/res/findit.html
>*   http://www.stata.com/support/statalist/faq
>*   http://www.ats.ucla.edu/stat/stata/

_________________________________________________________________
��������ص����ѽ��н������������  Live Messenger;
http://get.live.com/messenger/overview

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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