database - syntax error at or near "=" -
the error syntax error @ or near "=",namely if trans1.trans_type = '2' pkg_util_bd_logistics_convertopcode(trans1.trans_type,trans1.remark, trans1.std_id).the function pkg_util_bd_logistics_convertopcode there.the code migrated ora2pg.can help?
create or replace function bz_data_processer_bindsftransdatatoso () returns void $body$ declare v_soid bigint; v_shopid bigint; v_socode varchar(50); v_outerordercode varchar(200); v_ordercategory t_so_distinect_trans_head.order_category%type := 0; v_headcount bigint := 0; v_detailcount bigint := 0; v_distincttransheadcount bigint := 0; v_distincttransdetailcount bigint := 0; v_acceptimecount bigint := 0; v_distincttransheadid bigint; v_sltheadid bigint; v_createtimebefore timestamp := clock_timestamp() - interval '30 days'; trans1 record; trans record; begin trans1 in (select std_temp1.trans_type, std_temp1.tracking_no, std_temp1.order_id, std_temp1.std_id, std_temp1.accept_time, std_temp1.accept_address, std_temp1.remark, std_temp1.op_code, std_temp1.root_id, std_temp1.source, std_temp1.batch_no, std_temp1.signer (select st.trans_type, st.mailno tracking_no, st.orderid order_id, std.id std_id, std.accept_time, std.accept_address, std.remark, std.op_code, std.root_id, std.source, std.batch_no, std.signer t_mq_so_trans st, t_mq_so_trans_detail std st.id = std.so_trans_id , std.is_synch = 0 , st.trans_type in (1, 2, 3, 4, 5, 6, 8) , st.create_time between v_createtimebefore , clock_timestamp() , std.create_time between v_createtimebefore , clock_timestamp() order std.id asc) std_temp1 limit 99999) loop if trans1.trans_type = '2' pkg_util_bd_logistics_convertopcode(trans1.trans_type, trans1.remark, trans1.std_id); end if; end loop; trans in (select std_temp2.trans_type, std_temp2.tracking_no, std_temp2.order_id, std_temp2.std_id, std_temp2.accept_time, std_temp2.accept_address, std_temp2.remark, std_temp2.op_code, std_temp2.root_id, std_temp2.source, std_temp2.batch_no, std_temp2.signer (select st.trans_type, st.mailno tracking_no, st.orderid order_id, std.id std_id, std.accept_time, std.accept_address, std.remark, std.op_code, std.root_id, std.source, std.batch_no, std.signer t_mq_so_trans st, t_mq_so_trans_detail std st.id = std.so_trans_id , std.is_synch = 0 , st.trans_type in (1, 2, 3, 4, 5, 6, 8) , st.create_time between v_createtimebefore , clock_timestamp() , std.create_time between v_createtimebefore , clock_timestamp() order std.id asc) std_temp2 limit 99999) loop v_soid := 0; v_ordercategory := 0; v_shopid := null; v_socode := null; v_outerordercode := null; begin select so.id, so.shop_id, so.code, so.outer_order_code strict v_soid, v_shopid, v_socode, v_outerordercode t_so_tb_delivery_info tbi, t_so_sales_order tbi.so_id = so.id , tbi.trans_code = trans.tracking_no limit 1 offset 0; exception when no_data_found dbms_output.put_line $body$ language plpgsql security definer ;
in plpgsql function cannot stand on own. need perform
before pkg_util_bd_logistics_convertopcode( ... );
there may more problems ...
Comments
Post a Comment