-- $Id$
--
--  Langdurige uitgifte van de auto aan mdw SGGR corrigeren
-- Tbv overzicht poolauto's

DEFINE thisfile = '.SQL'
DEFINE dbuser   = '^SGGR'

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

-- Datum en tijd uitgifte corrigeren

UPDATE fac_tracking t
   SET t.fac_tracking_datum =
          TO_DATE ('10-2-2017 12:00:00', 'DD-MM-YY HH:MI:SS')
 WHERE fac_tracking_key = 353276;

-- Datum en tijd inname corrigeren

UPDATE fac_tracking t
   SET t.fac_tracking_datum =
          TO_DATE ('9-5-2017 9:00:00', 'DD-MM-YY HH:MI:SS')
 WHERE fac_tracking_key = 353278;

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