#!/bin/sh
sqlplus -S mcpp20/2yhlfsl@mcpp20 <<EOF >mo20090512
set head off feedback off verify off
set wrap off
set heading off
set newpage none
set linesize 175
select count(*),substr(state_tm,1,8) from mcpp_cdr_mo_t where m_state=0 and err_code=0 and target_gw=137111 and state_tm >=20090301000000 and state_tm <20090501000000 group by substr(state_tm,1,8);
exit
EOF
sqlplus -S mcpp20/2yhlfsl@mcpp20 <<EOF >mo20090512
set head off feedback off verify off
set wrap off
set heading off
set newpage none
set linesize 175
select count(*),substr(state_tm,1,8) from mcpp_cdr_mo_t where m_state=0 and err_code=0 and target_gw=137111 and state_tm >=20090301000000 and state_tm <20090501000000 group by substr(state_tm,1,8);
exit
EOF