Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: help in merging files


From   "Michael Blasnik" <michael.blasnik@verizon.net>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Re: help in merging files
Date   Mon, 27 Jun 2005 07:28:17 -0400

I think what you are looking to do is cross the files, not merge them. Try whelp cross.

Michael Blasnik
michael.blasnik@verizon.net

----- Original Message ----- From: "Mazhar Islam" <mail2mazhar@yahoo.com>
To: <statalist@hsphsun2.harvard.edu>
Sent: Sunday, June 26, 2005 6:59 PM
Subject: st: help in merging files



I have the following two files (whoprice and Stinfo).

I want to merge them as the last table.

FILE : wholprice

date price1 price2 price3

jan1 2005 1.3 3.5 9.8

jan2 2005 1.2 3.6 9.4
jan3 2005 1.4 3.5 9.2

FILE: Stinfo

store location address

A fshjf       sdfkhsf

B yiry       oerire

C fhsdk       dvbvv

I want to merge them as follows:


date     price1 price2 price3 store location address
jan1 2005 1.3 3.5 9.8 A fshjf       sdfkhsf
jan2 2005 1.2 3.6 9.4 A fshjf sdfkhsf


jan3 2005 1.4 3.5 9.2 A fshjf sdfkhsf

jan1 2005 1.3 3.5 9.8 B yiry oerire
jan2 2005 1.2 3.6 9.4 B yiry oerire

jan3 2005 1.4 3.5 9.2 B yiry oerire

jan1 2005 1.3 3.5 9.8 C fhsdk dvbvv

jan2 2005 1.2 3.6 9.4 C fhsdk dvbvv


jan3 2005 1.4 3.5 9.2 C fhsdk dvbvv

How shall I do it?

Thanks a lot

Mazhar
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index