set termout off
set arraysize 5
set echo off
set verify off
set heading off
set feedback off
set colsep ',';
set linesize 100
set pagesize 0
set sqlprompt ''
set trimspool on
define logname=date
column clogname new_value logname
select 'c:\temp\myexport'||to_char(sysdate, 'yyyymmdd') ||'.csv' clogname from dual;
spool '&logname'
select name,
fallennr,
alf_login,
merkmal from (
select to_number(b.lng_falle) lng_falle,
to_date(b.date_datum) date_datum,
to_number(b.int_fallennummer) int_fallennummer,
to_number(b.kw) kw,
to_number(b.lng_schaedling) schaedling,
to_number(b.int_volumen) int_volumen,
to_number(b.int_anzahl) int_anzahl,
a.name,
to_char(a.fallennr) fallennr,
a.alf_login alf_login,
a.merkmal
from borki.vt_fangzahlen_tageswerte_2010 b
inner join borki.vt_fallenstandorte a on b.lng_falle =
a.objectid
where to_char(a.fallennr) = '28'
and a.alf_login = 'ne'
and b.date_datum >to_date('31.03.2007','DD.MM.YYYY'))
group by name, fallennr, alf_login, merkmal
order by name, fallennr;
spool off;
|