選取特定欄目信息sql
insert into tmp_yym_itv2 select * from itv_fct_d20150620_61 where s_bannercode_two='00220015' or s_bannercode_two='00060003'
選取一個欄目的信息到一個文件中shell
cat tmp_yym_itv.txt|awk 'BEGIN{FS=",";OFS=","}{if($1=="00060003") print $0}'>00060003.txt
從數據庫中導出文件到目錄下數據庫
bcp tmp_qsj_app out tmp_qsj_app.txt -c -t '|' -r '\n' -UDBA -Psql -Szhxliq
mv tmp_huadan.txt liming_test_mdn.txtapp
刪除文件每行末尾的空格spa
sed 's/[ \t]*$//g' -i liming_test_mdn.txt