问题: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:
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');
表结构:
这样不会把null变成字符串null吗??
把定义语句贴出来多好啊,最好按照表的顺序贴出来,上面太乱了!!!查看表定义语句
>desc tablName;
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++;
你的 fx_interest_rate_unit_codefx_interest_mode_code 漏了逗号,二合一了。写代码有点粗心,金融行业的软件工程师如此粗心,很危险。
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)
)