日期:2014-05-17  浏览次数:21891 次

java.sql.BatchUpdateException: 批处理中出现错误: ORA-00972: 标识符过长
问题:java.sql.BatchUpdateException: 批处理中出现错误: ORA-00972: 标识符过长
弄了一天了,还是标识符过长,麻烦各位帮忙看下,到底在那地方出错了,谢谢!
SQL:
insert into fx_yl_card_acct (fx_account_id,fx_account_group_id,fx_account_suspend_code,fx_owner_org_id,fx_account_org_id,fx_manage_org_id,fx_account_open_date,fx_account_close_date,fx_account_expire_date,fx_product_id,fx_product_inner_id,fx_currency_code,fx_terms,fx_acct_status,fx_acct_cata,fx_acct_type_code,fx_account_balance,fx_account_name,fx_customer_id,fx_account_froze_code,fx_base_interest_rate,fx_float_interest_rate,fx_interest_rate_unit_codefx_interest_mode_code,fx_upda_date) values ('6217380000015034','null','null','50601','50601','90001','2012-02-15','null','null','null','null','CNY',null,'null','1','6',2.38,'康昌','140322198301041511','1',null,null,'null','null','2012-03-05');
表结构:


------解决方案--------------------
你的sql中的那些"null"是什么东西啊,如果你要插入null,直接写null就可以了啊,为什么要加引号呢?
这样不会把null变成字符串null吗??
------解决方案--------------------
还有,你给sql的字段和你给的表结构的字段根本对不上啊,第一个字段就在你的表定义中没有显示出来,你就不要贴图了,
把定义语句贴出来多好啊,最好按照表的顺序贴出来,上面太乱了!!!

查看表定义语句
>desc tablName;

------解决方案--------------------
你输入的fx_interest_rate_unit_codefx_interest_mode_code这个字段太长了,也许是漏了个逗号吧。
------解决方案--------------------
insert into fx_yl_card_acct (fx_account_id,fx_account_group_id,fx_account_suspend_code,fx_owner_org_id,fx_account_org_id,fx_manage_org_id,fx_account_open_date,fx_account_close_date,fx_account_expire_date,fx_product_id,fx_product_inner_id,fx_currency_code,fx_terms,fx_acct_status,fx_acct_cata,fx_acct_type_code,fx_account_balance,fx_account_name,fx_customer_id,fx_account_froze_code,fx_base_interest_rate,fx_float_interest_rate,fx_interest_rate_unit_code[color=#000080],fx_interest_mode_code[/color],fx_upda_date) values ('6217380000015034','null','null','50601','50601','90001','2012-02-15','null','null','null','null','CNY',null,'null','1','6',2.38,'康昌','140322198301041511','1',null,null,'null','null','2012-03-05');

--这个应该是手误吧?要不应该报字段不存在啊
------解决方案--------------------
兄弟是搞金融行业的吧?哪家公司的?

没记错的话,字段长度最大为30
你的 fx_interest_rate_unit_codefx_interest_mode_code 漏了逗号,二合一了。

写代码有点粗心,金融行业的软件工程师如此粗心,很危险。

------解决方案--------------------
fx_account_suspend_code VARCHAR2(2),你插入的值是'null',去掉引号或减小长度