红联Linux门户
Linux帮助

Linux下Shell脚本与Oracle交互脚本

发布时间:2015-02-13 21:56:03来源:linux网站作者:lizw778

wc -l 7*.txt

. ~/.bash_profile

cd /data/intfdata/ba/gtdata

database_pass=`cat /home/gmcc/database_work.conf`

---签约
sqluldr user=$database_pass query="select distinct servnumber||'||||' from tb6_lh_hhf_gj_temp8 where sfzshf='是' and lb='A' and amt=300 " field="|" file="7月份数据_签约_a类_300.txt"
sqluldr user=$database_pass query="select distinct servnumber||'||||' from tb6_lh_hhf_gj_temp8 where sfzshf='是' and lb='A' and amt=800 " field="|" file="7月份数据_签约_a类_800.txt"
sqluldr user=$database_pass query="select distinct servnumber||'||||' from tb6_lh_hhf_gj_temp8 where sfzshf='是' and lb='A' and amt=1000 " field="|" file="7月份数据_签约_a类_1000.txt"
sqluldr user=$database_pass query="select distinct servnumber||'||||' from tb6_lh_hhf_gj_temp8 where sfzshf='是' and lb='A' and amt=1200 " field="|" file="7月份数据_签约_a类_1200.txt"
sqluldr user=$database_pass query="select distinct servnumber||'||||' from tb6_lh_hhf_gj_temp8 where sfzshf='是' and lb='A' and amt=2000 " field="|" file="7月份数据_签约_a类_2000.txt"
                                                                                   
sqluldr user=$database_pass query="select distinct servnumber||'||||' from tb6_lh_hhf_gj_temp8 where sfzshf='是' and lb='B' and amt=300 " field="|" file="7月份数据_签约_b类_300.txt"
sqluldr user=$database_pass query="select distinct servnumber||'||||' from tb6_lh_hhf_gj_temp8 where sfzshf='是' and lb='B' and amt=800 " field="|" file="7月份数据_签约_b类_800.txt"
sqluldr user=$database_pass query="select distinct servnumber||'||||' from tb6_lh_hhf_gj_temp8 where sfzshf='是' and lb='B' and amt=1000 " field="|" file="7月份数据_签约_b类_1000.txt"
sqluldr user=$database_pass query="select distinct servnumber||'||||' from tb6_lh_hhf_gj_temp8 where sfzshf='是' and lb='B' and amt=1200 " field="|" file="7月份数据_签约_b类_1200.txt"
sqluldr user=$database_pass query="select distinct servnumber||'||||' from tb6_lh_hhf_gj_temp8 where sfzshf='是' and lb='B' and amt=2000 " field="|" file="7月份数据_签约_b类_2000.txt"
                                        
sqluldr user=$database_pass query="select distinct servnumber||'||||' from tb6_lh_hhf_gj_temp8 where sfzshf='是' and lb='C' and amt=300 " field="|" file="7月份数据_签约_c类_300.txt"
sqluldr user=$database_pass query="select distinct servnumber||'||||' from tb6_lh_hhf_gj_temp8 where sfzshf='是' and lb='C' and amt=800 " field="|" file="7月份数据_签约_c类_800.txt"
sqluldr user=$database_pass query="select distinct servnumber||'||||' from tb6_lh_hhf_gj_temp8 where sfzshf='是' and lb='C' and amt=1000 " field="|" file="7月份数据_签约_c类_1000.txt"
sqluldr user=$database_pass query="select distinct servnumber||'||||' from tb6_lh_hhf_gj_temp8 where sfzshf='是' and lb='C' and amt=1200 " field="|" file="7月份数据_签约_c类_1200.txt"
sqluldr user=$database_pass query="select distinct servnumber||'||||' from tb6_lh_hhf_gj_temp8 where sfzshf='是' and lb='C' and amt=2000 " field="|" file="7月份数据_签约_c类_2000.txt"