--
-- $Id$
--
-- Voeg nieuwe export functie toe.

DEFINE thisfile = 'RABO#53364.SQL'
DEFINE dbuser   = '^AA|^AQQA|^ASMS|^GULU|^NMMS|^RABO|^ZKHM|^INLO|^EXPO|^SMKA'

SET ECHO ON
SET DEFINE ON
COLUMN fcltlogfile NEW_VALUE fcltlogfile NOPRINT;
WHENEVER SQLERROR EXIT;
SELECT adm.scriptspoolfile('&dbuser', '&thisfile') AS fcltlogfile FROM DUAL;
WHENEVER SQLERROR CONTINUE;
SPOOL &fcltlogfile
SET DEFINE OFF

------ payload begin ------

INSERT INTO fac_export_app (fac_export_app_code,
                            fac_functie_key,
                            fac_export_app_folder,
                            fac_export_app_file_prefix,
                            fac_export_app_postfix,
                            fac_export_app_log_postfix,
                            fac_export_app_flags,
                            fac_export_app_timestamp,
                            fac_export_app_prefix)
    SELECT 'HOURLY_TASK',
           fac_functie_key,
           '.\LOG',
           'hourly_task_',
           '.csv',
           '.log',
           0,
           'yyyymmdd',
           'AAXX'
      FROM fac_functie
     WHERE fac_functie_code = 'WEB_PRSSYS';

------ payload end   ------

SET DEFINE OFF
BEGIN adm.systrackscriptId ('$Id$', 0); END;
/

COMMIT;
SET ECHO OFF
SPOOL OFF
SET DEFINE ON
PROMPT Logfile of this upgrade is: &fcltlogfile