Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

st: is it stata or something else acting off


From   tashi lama <ltashi32@hotmail.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: is it stata or something else acting off
Date   Fri, 14 Sep 2012 15:12:13 +0000

Hello all, 
    I have my syntax options capitalised to allow abbreviation. It works with all other options listed below except startdate and enddate. Here is the detail. 

program foo
syntax, [DOC_type(str)] [ANALYST(str)]  [TICKER(str)] [SECTOR(str)] STARTdate(str) ENDdate(str) [FIRM(int -1)] [STAT(str)]
if "`doc_type'"!=""{
  odbc load, exec("select count(*) from reader where read_date between '`start'' and '`end''")
  ............
  ............
}
end 

foo, doc(company) start(2011-01-01) end(2011-04-01) firm(567) 

  The ODBC driver reported the following diagnostics
[MonetDB][ODBC Driver 11.9.5]timestamp () has incorrect format
22007!timestamp () has incorrect format
SQLSTATE=22007
r(682);

while 

program foo
syntax, [DOC_type(str)] [ANALYST(str)]  [TICKER(str)] [SECTOR(str)] START(str) END(str) [FIRM(int -1)] [STAT(str)]
if "`doc_type'"!=""{
  odbc load, exec("select count(*) from reader where read_date between '`start'' and '`end''")
  ............
  ............
}
end 

foo, doc(company) start(2011-01-01) end(2011-04-010 firm(567)   works..

Any idea??

Thanks, 
Tashi foo, doc(company) start(2011-01-01) end(2011-04-01) firm(567) foo, doc(company) start(2011-01-01) end(2011-04-01) firm(567) foo, doc(company) start(2011-01-01) end(2011-04-01) firm(567) foo, doc(company) start(2011-01-01) end(2011-04-01) firm(567)  		 	   		  
*
*   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   |   Site index