tmp.CSV文件的内容
#日期,判断,科目,时间点,数值,峰值
,正确,理工科,20120911 18:45:10,13.5,23
,错误,理工科,20120818 17:45:10,13.5,23awk 'NR != 1' tmp.csv | awk -F, '{print "update t_tmp t set t.fengzhi = "$6" where 
to_char(t.date,'\''yyyymmdd'\'') = '\''" $4 "'\'' and trim(t.panduan) = '\''" $2 "'\'';"}' > tmp.sql输出的sql语句为
update t.tmp t set t.fengzhi = 23 where to_char(t.date,'yyyymmdd') = '20120911 18:45:10' 
and trim(t.panduan)= '正确';
update t.tmp t set t.fengzhi = 23 where to_char(t.date,'yyyymmdd') = '20120818 17:45:10'
and trim(t.panduan)= '错误';
请问怎么在awk语句里把$6的日期格式处理为yyyymmdd,不要时分秒,下面的日期格式是我想要的update t.tmp t set t.fengzhi = 23 where to_char(t.date,'yyyymmdd') = '20120911'
and trim(t.panduan)= '正确';
update t.tmp t set t.fengzhi = 23 where to_char(t.date,'yyyymmdd') = '20120818'
and trim(t.panduan)= '错误';