A: 通过reporthist可以返回某只股票所有的报告期,再截取在该段时间内的所有报告期。
e.g. 取万科A在2001年1月1日到2006年5月底的所有报告期。
begt:=20010101;
endt:=20060530;
setsysparam(pn_stock(),'SZ00002');
ALLRD:=ReportHist(46002);
return sselect thisrow from ALLRD where thisrow>=begt and thisrow<=endt end;