Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: is it stata or something else acting off
From
tashi lama <[email protected]>
To
<[email protected]>
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/