strQuery =" update "+dbInfo.getDB4SQL()+"temp_detail "
+" set a1 = (select NVL(sum(foe03f),0) from "+dbInfo.getDB4SQL() +"fom05 "
+" where foe00c = '"+args[0].trim()+"' and fpd01c = foe01c and reportid= '"+reportid+"');";
語句時沒問題的
+" set a1 = (select NVL(sum(foe03f),0) from "+dbInfo.getDB4SQL() +"fom05 "
+" where foe00c = '"+args[0].trim()+"' and fpd01c = foe01c and reportid= '"+reportid+"');";
語句時沒問題的
解决方案 »
- 一个简单的窗体打开、关闭和激活事件
- j2ee5+tomcat6.0+myeclipse6.0(eclipse3.3 j2ee版的)如何配制
- 高手帮我
- 为什么TXT文件保存成功后,一切功能就丧失了?而在线打开就没问题
- 求助:使用JavaCommunications API串口读时总抛出异常:java.lang.NoClassDefFoundError: javax/comm/SerialPortEventListener
- package 问题,请教!
- 哪位高手来分析一下这段代码.
- 推荐软件:Smart Setup-短小精悍安装程序生产器,完全免费
- 有没有free的java下打印报表的类,能预览?不要试用的,也不要购买后才能用的。谢谢各位!
- Calendar.getTime()返回的月份相差了一个月,谁遇到过,怎么解决?
- main()括号中是什么参数!
- Jbuilder中如何引用别人开发的包?
stmtSP = connSP.createStatement();
stmtSP.execute(strQuery);
strQuery =" update "+dbInfo.getDB4SQL()+"temp_detail "
+" set a1 = (select NVL(sum(foe03f),0) from "+dbInfo.getDB4SQL()+"fom05 "
+" where foe00c = '"+args[0].trim()+"' and fpd01c = foe01c and reportid = '"+reportid+"');";
stmtSP.executeUpdate(strQuery);
例如:select * from tablewhere ...仔细检查。
好的习惯,字符串前后加空格。
(不要你自己写好的理想中的SQL语句去执行)看看这句SQL文行不行。我直觉
是语句本身的语义没错,语法错了。也就是,你在执行前,真正执行的语句
有问题。