以下命令暂作记录,方便写重复的oracle存储过程;
(1)拼接查询条件
文件c如下:
v_allBusinessId t_order%type := allBusinessId;
v_customerName t_order%type := customerName;
awk -F " " '{print $1}' c|while read a;do echo "if $a is not null then " && echo " v_innerSql := v_innerSql||' and upper(ord.) like '''||v_fen||upper($a)||v_fen||'''';" &&echo "end if;";done
注意 Linux命令行中:“&&”可以换行!