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

Re: Re: st: preserving var. labels while converting data into STATA


From   [email protected] (Kevin Turner)
To   Statalist <[email protected]>
Subject   Re: Re: st: preserving var. labels while converting data into STATA
Date   Tue, 06 May 2003 16:04:32 -0500

Joseph Coveney <[email protected]>, writes:

>Asad asked about getting the variable labels ("Description" in "Design View")
>in a Microsoft Access database into Stata.  I, too, would be interested if
>anyone has any suggestions on this.
>
>From his posting, apparently it is at least partially feasible, since DBMS is
>able to carry over most of them, although StatTransfer does not see them.
>
>Philippe Glaziou suggested that an ODBC pass-through SQL SELECT command [-odbc
>load , exe("...") noquote-] command might work, but I have not been able to see
>the variable labels in a probe Access 2000 database using that route.  I'm not
>sure that Microsoft makes these visible to SQL-based queries to Access.

Stata's odbc command does make a basic request for variable labels, or 
descriptions, but in the case of Microsoft Access, the value that is returned
is simply the variable name, not the description seen from the Design View 
of Access. I assume this is simply a deficiency in Access drivers and Stat
Tranfer's inability to also import these labels furthers my theory. 

Now, there may still be a way to coax the information from Access drivers but I
have yet to discover one. 

As a side note, you will notice that Stat Transfer keeps the variable labels
even if they are copies of the variable names. Stata's -odbc load- command
chooses to omit the variable label if it equals the variable name, as this 
would be redundant.

--Kevin 
[email protected]
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index