Statalist


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

st: handling dates in odbc load exec


From   David Hamilton <dthamilton@mac.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: handling dates in odbc load exec
Date   Mon, 16 Nov 2009 23:39:08 -0500

I am hoping someone can please provide some clarification on the use  
of exec SELECT WHERE in odbc load.  In the Data Management  
documentation for odbc load, it says that SQL data types are converted  
into Stata data types.  Does this just refer to the data format AFTER  
retrieving it from the database?   I'm trying to read in a subset from  
a very large Sybase data table (daily financial data for the past 20  
years) based on a date formatted variable, date.  However, I cannot  
seem to get the "SELECT * from tablename WHERE date>12/31/2008" to  
read in the subset correctly because I cannot seem to get the "WHERE  
date>12/31/2008" part right.  I've tried specifying the date WHERE a  
few ways with no luck.  Do I need specify the date as a Stata date? a  
string? a SQL date? Thanks in advance for the help.

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index