问题: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');
表结构:

解决方案 »

  1.   

    你的sql中的那些"null"是什么东西啊,如果你要插入null,直接写null就可以了啊,为什么要加引号呢?
    这样不会把null变成字符串null吗??
      

  2.   

    还有,你给sql的字段和你给的表结构的字段根本对不上啊,第一个字段就在你的表定义中没有显示出来,你就不要贴图了,
    把定义语句贴出来多好啊,最好按照表的顺序贴出来,上面太乱了!!!查看表定义语句
    >desc tablName;
      

  3.   

    你输入的fx_interest_rate_unit_codefx_interest_mode_code这个字段太长了,也许是漏了个逗号吧。
      

  4.   

    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');--这个应该是手误吧?要不应该报字段不存在啊
      

  5.   

    这个传进来的值不知道是不是空啊
    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_code," +
    "fx_interest_mode_code,fx_upda_date" +
    ") values ('" + 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+"','"+ fx_interest_mode_code + "','"+fx_upda_date+"');";
    n++;
      

  6.   

    兄弟是搞金融行业的吧?哪家公司的?没记错的话,字段长度最大为30
    你的 fx_interest_rate_unit_codefx_interest_mode_code 漏了逗号,二合一了。写代码有点粗心,金融行业的软件工程师如此粗心,很危险。
      

  7.   

    (
      fx_account_id              VARCHAR2(32) not null,
      fx_account_group_id        VARCHAR2(32),
      fx_account_suspend_code    VARCHAR2(2),
      fx_owner_org_id            VARCHAR2(20),
      fx_account_org_id          VARCHAR2(20),
      fx_manage_org_id           VARCHAR2(20),
      fx_account_open_date       VARCHAR2(10),
      fx_account_close_date      VARCHAR2(10),
      fx_account_expire_date     VARCHAR2(10),
      fx_product_id              VARCHAR2(10),
      fx_product_inner_id        VARCHAR2(16),
      fx_currency_code           VARCHAR2(3),
      fx_terms                   NUMBER,
      fx_acct_status             VARCHAR2(2),
      fx_acct_cata               VARCHAR2(2),
      fx_acct_type_code          VARCHAR2(4),
      fx_account_balance         NUMBER(16,2),
      fx_account_name            VARCHAR2(60),
      fx_customer_id             VARCHAR2(20),
      fx_account_froze_code      VARCHAR2(2),
      fx_base_interest_rate      NUMBER(8,6),
      fx_float_interest_rate     NUMBER(6,4),
      fx_interest_rate_unit_code VARCHAR2(2),
      fx_interest_mode_code      VARCHAR2(2),
      fx_upda_date               VARCHAR2(10)
    )
      

  8.   

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