hibernate为啥查询会出现错误啊,我的查询语句没问题,使用原生sql也不行,求大神解决
Stringsql="selectstc.`Invoice_category`,stc.Category_No,stc.Invoice_No,ts.Company_Nam...
String sql = "select stc.`Invoice_category`,stc.Category_No,stc.Invoice_No,ts.Company_Name,ts.ID_Card ,stc.Invoice_Date,stc.`Month`,stc.Total_Money," +
"stc.Tax_Rate,stc.SumTaxMoney,stc.Flag from security_tax_controlled stc , tax_supplier ts where stc.S_PK_ID=ts.ID_Card and stc.secType='销项'" +
"and stc.invoice_Date>='"+firsttime+"' and stc.invoice_Date<='"+lasttime+"'";
SQLQuery query = this.getSession().createSQLQuery(sql);
List<Object []> objs = query.addEntity(TaxInformVO.class).list();
贴上代码
The server encountered an internal error () that prevented it from fulfilling this request.
exception 展开
"stc.Tax_Rate,stc.SumTaxMoney,stc.Flag from security_tax_controlled stc , tax_supplier ts where stc.S_PK_ID=ts.ID_Card and stc.secType='销项'" +
"and stc.invoice_Date>='"+firsttime+"' and stc.invoice_Date<='"+lasttime+"'";
SQLQuery query = this.getSession().createSQLQuery(sql);
List<Object []> objs = query.addEntity(TaxInformVO.class).list();
贴上代码
The server encountered an internal error () that prevented it from fulfilling this request.
exception 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询