换了个数据库,从oracle换为sql server2005,出现错误
Java code:
hql = "from Position p where p.tpId= '"+postId+"'";
很简单的一个hql语句都会报错,只是换了一下数据库,报如下错误:
Java code:
18:46:32,562 ERROR JDBCExceptionReporter:72 - 关键字 'where' 附近有语法错误。
org.springframework.orm.hibernate3.HibernateJdbcException: JDBC exception on Hibernate data access; nested exception is org.hibernate.exception.SQLGrammarException: could not execute query
Caused by: org.hibernate.exception.SQLGrammarException: could not execute query
遇到过这类情况的朋友请回答下哈,谢谢了。
同时祝大家新春快乐!
刚刚查询所有,即便 hql语句没有后面的where限制条件仍然出现同样的错误。
有一个地方是这样写的
Java code:
public PageModel selectAll(final HibernateTemplate hibernateTemplate,final int pageNo, final int pageSize,final String hql, final String hqlCount){
PageModel pageModel = null;
List itemList = new ArrayList();
try {
itemList = hibernateTemplate.executeFind(new HibernateCallback(){
public Object doInHibernate(Session session) throws Hib
相关问答:
执行的顺序:
1)文件浏览框(选择文件使用)
选择好文件后
点击一个导入按钮的时候 ,把上面上传框里的csv文件以一个ID为文件名,上传到**/**文件夹下
2)读取这个文件夹下的csv的文件,转换成sql
3 ......
各位大哥,帮个忙。
下个Oracle for vista 版本的安装试试
10G和11G的
http://www.oracle.com/technology/software/products/database/index.html
------------------------------------------- ......
可能因为工作的原因 接触数据库这块比较少,之前都是做程序这块,数据库这块都有专门的人来做 分工都很明细 所以对数据库这一块完全不了解。前段时间 去面试了几家公司 几乎都是在数据库这块挂掉的 连个简单的SQ ......
在系统运行的时候总是有一块磁盘始终闪红灯,进入系统后
#topas查看总是有一块磁盘%BUSY为90%以上,
数据库版本:oracle 9.2.0.7
数据文件挂载的节点:/oradata/pcs/ 逻辑卷号lv04
#lslv -l lv04
......
tab1 字段:billdate,goodsid,incount,inmoney,outcount,outmoney,endprice,endcount,endamt
tab2 字段:goodsid,goodskind(商品类型)
tab3 字段:goodskind(商品类型),kindname
结果:
得到商品类型在一段时间 ......