Hawq学习笔记 --- 存储过程生成数据

创建一个存储过程


create or REPLACE FUNCTION Loopcopy() RETURNS INTEGER as $$
DECLARE
j INT;
BEGIN
				j := 0;
				while j < 100 loop
					copy tbl_pccs_biz_act_action_his from '/mnt/disk01/eds/pccs/TBL_PCCS_BIZ_ACT_ACTION_HIS.txt' delimiter as ',' CSV quote as '"';
					copy tbl_pccs_biz_act_tc_his from '/mnt/disk01/eds/pccs/TBL_PCCS_BIZ_ACT_TC_HIS.txt' delimiter as ',' CSV quote as '"';
					copy tbl_pccs_biz_case_acct_his from '/mnt/disk01/eds/pccs/TBL_PCCS_BIZ_CASE_ACCT_HIS.txt' delimiter as ',' CSV quote as '"';
					copy tbl_pccs_biz_case_casemain_his from '/mnt/disk01/eds/pccs/TBL_PCCS_BIZ_CASE_CASEMAIN_HIS.txt' delimiter as ',' CSV quote as '"';
					copy tbl_pccs_biz_case_flags_his from '/mnt/disk01/eds/pccs/TBL_PCCS_BIZ_CASE_FLAGS_HIS.txt' delimiter as ',
©️2020 CSDN 皮肤主题: 编程工作室 设计师:CSDN官方博客 返回首页
实付 9.90元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值