select a.id, a.createdat, a.doctype, a.docstate,a.totalsum from smdocuments a Where a.ID = a.doctype IN ('WI','IW','WO') and a.createdat=sysdate order by a.doctype
select a.id, a.createdat, a.doctype, a.docstate,a.totalsum from smdocuments a Where a.doctype IN ('WI','IW','WO') and a.createdat=TO_DATE(sysdate,'DD.MM.YY') order by a.doctype
exporter slava supermag qqq @zapros rep.xls /r