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

Re: st: Appending files when variables differ in their types

From   Steven Dubnoff <>
Subject   Re: st: Appending files when variables differ in their types
Date   Wed, 09 Oct 2002 12:08:07 -0700

At 12:04 PM 10/9/2002 -0400, you wrote:
Dear All,

This is a relatively simple question. I am appending data from the same survey
for different years...

Since you are coming from dBASE with Stat/Transfer, you may want to handle this in Stat/Transfer. I suggest that you first go from dBASE to delimited ASCII, which will give you much more control over variable types.

Before you transfer your data to ASCII, I suggest you set the "String Quote Character" to blank. That will ensure that numbers entered as strings remain as numbers when you read them back. (This technique also works for troublesome Excel files, where numbers sometimes end up as strings for reasons known only in Redmond).

Then append the ASCII file either using an editor or a DOS command, e.g. "copy file1.csv+file2.csv out.csv". Then use Stat/Transfer to move the appended files to Stata. At that point, you can review the types on the "Variables" tab and change them if you wish.



Steven Dubnoff
Circle Systems We make your data instantly usable.
Download Stat/Transfer from
1001 Fourth Avenue, #3200 (206) 682-3783
Seattle, WA 98154 Fax (206) 328-4788

* For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index