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, is already up and running.

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

Re: st: use of tempfile

From   Prakash Singh <>
Subject   Re: st: use of tempfile
Date   Thu, 19 Apr 2012 17:40:51 +0530

Nick I beg to differ you
I have done using stata programming what I intend to do but then I
thought why to have unnecessarily the data file which I do not want. I
ma definite about reshape and separate would not do good.

Let me try final time to explain what I am interested in doing.

suppose we use this and do

use sales1.dta, clear
keep if sate_code==1
ren  sate_code sate_code1
ren exp_val exp_val1
ren sales_val sales_val1
save, replace
use sales1.dta, clear
keep if sate_code==20
ren  sate_code sate_code20
ren exp_val exp_val20
ren sales_val sales_val20
save sales1_20.dta, replace

use, clear
merge common_id using sales1_2.dta
save sales1_1_2.dta
use, clear
merge common_id using sales1_20.dta
save sales1_1_20.dta

But this way I have 40 data file but what I am trying to in the code
posted in first mail is to have only one file finaly i.e.

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index