日期:2014-05-16  浏览次数:20363 次

oracle 的存储过程 传数组操作和java结合

INSERT INTO cux_oa_api_history_para
						(history_id
						,item_id
						,param_code
						,param_name
						,param_value
						,param_uom
						,creation_date
						,created_by
						,last_update_date
						,last_updated_by
						,last_update_login)
						SELECT p_history_id
									,p_inventory_item_id
									,t.param_code
									,t.param_name
									,t.param_value
									,t.param_uom
									,SYSDATE
									,fnd_global.user_id
									,SYSDATE
									,fnd_global.user_id
									,fnd_global.login_id
							FROM THE (SELECT CAST(p_item_paras AS oa.array_item_para)
													FROM dual) t;



								oracle.sql.ArrayDescriptor desc = oracle.sql.ArrayDescriptor.createDescriptor("ARRAY_ITEM_PARA",conn);
								
								oracle.sql.ARRAY array = new oracle.sql.ARRAY(desc,conn,obj);
								
								cs.setArray(index +1, array);