CREATE PROCEDURE do_region_for_organization() returning varchar(30),varchar(30),varchar(254)
DEFINE v_business_id decimal(12,0);
DEFINE v_party_id decimal(12,0);
DEFINE v_region_id decimal(12,0);
DEFINE v_org_type_id decimal(9,0);
DEFINE sql_err int; --异常错误代码申明
DEFINE isam_err int; --异常错误代码申明
DEFINE error_info varchar(254); --异常错误信息申明
ON EXCEPTION SET SQL_ERR,ISAM_ERR,ERROR_INFO
return SQL_ERR,ISAM_ERR,ERROR_INFO;
END EXCEPTION WITH RESUME;
-------business_id记录营业区id region_id记录处理局id
FOREACH
SELECT party_id,org_type_id INTO v_party_id,v_org_type_id FROM proddb:organization where org_type_id >= 4 and party_id = 100300017796
insert into org_temp values(v_party_id,v_org_type_id);
insert into org_temp values (2,2);
insert into fl_test
SELECT party_id FROM proddb:organization --这里报“-1214 值过大,不能放进一个SMALLINT”
where org_type_id = '4'
start with party_id = 100300017796
connect by prior parent_party_id = party_id ;
insert into org_temp values (3,3);
insert into org_temp values (4,4);
END FOREACH;
END PROCEDURE;
请高手请问如何修改!
------解决思路----------------------
int--->SMALLINT
varchar(254)--->CHAR(254)
按以上修改应该就没问题了。