Statalist The Stata Listserver


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

Re: st: Data management question


From   Steven Samuels <[email protected]>
To   [email protected]
Subject   Re: st: Data management question
Date   Sat, 2 Jun 2007 18:06:54 -0400

links at the bottom of the -merge- help will give you your answer.

On Jun 2, 2007, at 5:41 PM, Roy,Suryadipta wrote:

Hi,

I am trying to join two datasets. The first one is of the form:
id code
1 a
2 b
3 c
4 d

The second is of the form:
id1 code1
3 c
4 d

I am trying to merge these two datasets such that the new dataset is of the form:

id id1 code code1
1 3 a c
1 4 a d
2 3 b c
2 4 b d
3 3 c c
3 4 c d
4 3 d c
4 4 d d

Any help would be highly appreciated.
Thanks!!!
Suryadipta.

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