Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index