| |
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: tosql datatypes
On Jun 13, 2007, at 1:13 AM, Hendri Adriaens wrote:
tosql writes datatypes for variables when creating a table creation
script. But it uses the Stata datatypes for this, not the sql
datatypes. I have a column of integers, some around 36000. Stata
treats this as float, but this has a different meaning in sql. This
is inconvenient as you will need conversions or casts in the
program using the sql database to make sure that computations won't
fail on the datatype.
Is there a way to improve on this? For instance via an interface to
tosql that allows for overruling the type of certain columns (or
all at once).
Use the -cre- option to write the table creation statement to a
separate file; you can then modify the target column types however
you wish.
-- Phil
*
* 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/