linux下查看当前系统磁盘空间使用情况:df -h
集团产品行列转换:
create table hx_temp_lzjt_fin as
select groupid,max(groupname) groupname,max(grouptype) grouptype,'正常' status,
sum(case when pro_name='' and status in ('正使用','产品停用','预约销户') then '1' else '0' end) cl,
sum(case when pro_name='' and status in ('正使用','产品停用','预约销户') then '1' else '0' end) dh,
sum(case when pro_name='' and status in ('正使用','产品停用','预约销户') then '1' else '0' end) zj,
sum(case when pro_name='' and status in ('正使用','产品停用','预约销户') then '1' else '0' end) yx,
sum(case when pro_name='' and status in ('正使用','产品停用','预约销户') then '1' else '0' end) mp,
sum(case when pro_name='' and status in ('正使用','产品停用','预约销户') then '1' else '0' end) qxt,
sum(case when pro_name=''and status in ('正使用','产品停用','预约销户') then '1' else '0' end) zl
from hx_temp_lzjt
group by groupid;
导数:
load data
infile 'D:/积分20090212/jf_0212.txt/jf_0212.txt'
truncate
append
into table tb_result_tmp2
fields terminated by '|'
trailing nullcols
(
servnumber ,
custname ,
carttype_name ,
age ,
sex_name ,
use_score ,
tuoshou_flag ,
huafei_flag ,
xiaofei_flag
)
sqlplus / as sysdba
alter user scott identified by scott;
sqlplus scott/scott
dhhm.ctl
load data
infile 'C:/Documents and Settings/Administrator/桌面/dhhm.txt'
truncate
append
into table dhhm
fields terminated by '|'
trailing nullcols
(
telnum
)
cd 'C:/Documents and Settings/Administrator/桌面
sqlldr scott/scott control=dhhm.ctl
file:///D:/每天保垒机数据备份
cat session_cz200902.log | awk -F'|' '{print $1"|"$6"|"$7/100"|"}' >> szxcz200902.unl
sed -e '1,12d' qqt_dg_cz_200902.txt >>tt.txt
cat tt.txt | awk -F'|' '{print $1"|"$3"|"$2"|"}' >qqt_dg_cz_200902.bak
awk '{print length($0)}' DG22HP20090201.TXT | sort -u