0

嗨,我必须将参数传递给报告...带有 concat-date ....但它显示错误...像这样...在列表框中有 2011-2012,2012-2013...这里是我的 oracle 查询

DATE FOMART IN DATABASE:25-Mar-2012 

oracle query
select tran_date,
ROUND (nvl(sum(WALKIN_WITHOUT_CGROUP),0)/ COUNT(*),2)APC
from OUTLET_PAYMODE_REPORT_FACT 

Before Open:
var sqld= new String();
yearParam = params["Year"].value;
yearParam = yearParam.split("-");
startYear = yearParam[0];
endYear = yearParam[1];

this.queryText =this.queryText +" where TRAN_DATE between '" + startYear + "01-Mar-' and '" + endYear + "30-Mar-'"+
"group by tran_date"

但我收到这样的错误.....

 org.eclipse.birt.report.data.oda.jdbc.JDBCException: SQL statement does not return a ResultSet object.
SQL error #1:ORA-01861: literal does not match format string
4

1 回答 1

0

我想,你的 sql 字符串应该是

" where TRAN_DATE between '01-Mar-" + startYear + 
                   "' and '30-Mar-" + endYear + "' " + 
"group by tran_date"
于 2013-09-21T05:51:28.220 回答