mdsql -d 5 mdsql> select * from a#!/bin/ksh##################################################################################################脚本名称:......
mdsql -d 5 mdsql> select * from a
#!/bin/ksh ################################################################################################# # 脚本名称:
# 脚本功能: # ################################################################################################# . /home/omc/win_smpser_common.rc today=`date ' %Y%m%d'` workdir=/home/omc/userfile/jp/getyue cd $workdir if [ -f numservice.unl ];then rm numservice.unl fi if [ -f cbe_subscriber_ext.unl ];then rm cbe_subscriber_ext.unl fi if [ -f active*.unl* ];then rm -f active*.unl* fi day=$begindate cd ${workdir} echo "unload to numservice.unl select * from a where HOMEDEPARTMENT=759;"|mdsql echo "unload to cbe_subscriber_ext.unl select * from b
where expiretime > '${today}235959' and localarea='759' and activeflag=1;"|mdsql awk -F"|" '{ if(FILENAME=="cbe_subscriber_ext.unl") { subkey[$1]=$24 } if(FILENAME=="numservice.unl") { if($9 in subkey) { print $5"|"subkey[$9] } } }' cbe_subscriber_ext.unl numservice.unl >> notcho.unl
if [ -f numservice.unl ];then rm -f numservice.unl fi if [ -f cbe_subscriber_ext.unl ];then rm -f cbe_subscriber_ext.unl fi
|