Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: tosql datatypes


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: tosql datatypes
Date   Wed, 13 Jun 2007 09:43:18 +0100

Postings like this would be clearer with information
like this

I am using -tosql- from SSC by Kit Baum, which writes ...

Note also the -cmdname- convention. 

A little imagination shows that types of readers include

1. Those who might read your post and think "That is
something I want to do or might want to do. Where is -tosql-?" 

2. Those who might be able to help with your question but 
are unable to remember all the names of all the programs in 
the public domain (which number several thousand). For 
example, I have been a close observer of the Stata community 
for several years but could not recall this program. A -findit tosql- 
showed that it was written by Kit Baum, and that I commented
on a draft! So, a reminder does no harm and possibly is very 
helpful. 

This is not just reminding you of reasonable conventions. It 
is in posters' own interests to make their questions as informative 
as possible -- otherwise the number of people who think "No 
idea what that is all about" increases to the limit of the whole 
list. 

I don't have an answer to your specific question except that
the code of -tosql- is open to view for you to write your own 
variant. 

Nick 
[email protected] 

Hendri Adriaens
 
> 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).

*
*   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