SQL批处理运行异常,知道的帮忙下

SQL批处理运行异常,知道的帮忙下

SQL批处理运行错误,知道的帮忙下!

INSERT   INTO   e_deal   (joint,company_joint,year,sale,asset,earn)   select   ’91 ‘, ‘4806

,2005, ‘ ‘, ‘ ‘, ‘ ‘   from   organization   t   where   t.id= ‘4806 ‘;INSERT   INTO   e_deal   (joint,

ompany_joint,year,sale,asset,earn)select   ’90 ‘, ‘4806 ‘,2006,t.sale,t.asset,t.taxp

  from   organization   t   where   t.id= ‘4806 ‘;INSERT   INTO   e_deal   (joint,company_joint,

ear,sale,asset,earn)   select   ’89 ‘, ‘4806 ‘,2007, ‘ ‘, ‘ ‘, ‘ ‘   from   organization   t   where

t.id= ‘4806 ‘

java.sql.BatchUpdateException:   You   have   an   error   in   your   SQL   syntax;   check   the

anual   that   corresponds   to   your   MySQL   server   version   for   the   right   syntax   to   use

near   ‘ ‘ ‘   from   organization   t   where   t.id= ‘4806 ‘ ‘   at   line   1

                at   com.mysql.jdbc.Statement.executeBatch(Statement.java:1086)



t.id= ‘4806 ‘ 是不是应该是 t.id=4806




t.id= ‘4806 ‘ 不会报告错误。




INSERT INTO e_deal (joint,company_joint,year,sale,asset,earn) select ’91 ‘, ‘4806 ‘, ‘2005 ‘, ‘ ‘, ‘ ‘, ‘ ‘ from organization t where t.id= ‘4806 ‘;

INSERT INTO e_deal (joint,ompany_joint,year,sale,asset,earn) select ’90 ‘, ‘4806 ‘,2006,t.sale,t.asset,t.taxp from organization t where t.id= ‘4806 ‘;

INSERT INTO e_deal (joint,company_joint,ear,sale,asset,earn) select ’89 ‘, ‘4806 ‘,2007, ‘ ‘, ‘ ‘, ‘ ‘ from organization t where t.id= ‘4806 ‘;

修正了几处语法错误,楼主试验一下。

SQL批处理运行异常,知道的帮忙下

相关文章:

你感兴趣的文章:

标签云: