Statalist


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

st: RE: variable names with first character being a number


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: variable names with first character being a number
Date   Thu, 14 Jan 2010 19:17:34 -0000

I presume you can do this before you import -- but I don't have any
Access expertise to suggest how that is done -- or after you import. I
don't think any Stata import commands offer options on name mapping, so
not during the import. 

In Stata you can use -rename-, -renvars- (SJ), etc. 

Nick 
[email protected] 

raoul reulen

I am loading several MS Access datasets into Stata via an odbc
connection, but some variables have a number as the first character of
the variable name. Stata  doesnt like this and changes the name into a
default name like var1. How can I keep the original variable name but
add, for example, a letter to the variable name?

For example, I want change:

23_alcohol_units

into

Q23_alcohol_units


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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