/* Formatted on 9-11-2017 16:54:31 (QP5 v5.136.908.31019) */
--
-- $Id$
--
-- Eenmalig acties tbv Import van Besteding

DEFINE thisfile = 'LOGC#54912.SQL'
DEFINE dbuser   = '^LOGC'

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 ------

CREATE TABLE logc_imp_uren_besteding
(
    datum_txt VARCHAR2 (20),
    project VARCHAR2 (20),
    categorie VARCHAR2 (100),
    werknemer NUMBER (10),
    uren NUMBER (10, 2),
    transactietekst VARCHAR2 (40),
    mld_melding_key NUMBER (10),
    datum DATE
);


INSERT INTO fac_import_app
            (fac_import_app_code, fac_import_app_oms, fac_functie_key, fac_import_app_prefix)
   SELECT 'UREN_BESTEDING', 'Administratie: import van SAP/AX urenbesteding per dag', fac_functie_key, 'LOGC'
     FROM fac_functie
    WHERE fac_functie_code = 'WEB_PRSSYS';

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

SET DEFINE OFF

BEGIN
   adm.systrackscriptId (
      '$Id$',
      1);
END;
/

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