--
-- $Id$
--
-- Ongebruikte werkplekken verwijderen omdat volgnummers de veldgrootte van NUMBER(4) overschrijdt,
-- en gewoon om op te schonen.

DEFINE thisfile = 'UWVA#54757.SQL'
DEFINE dbuser   = '^UWVA'

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

DELETE FROM prs_werkplek
      WHERE prs_werkplek_key NOT IN
                (SELECT prs_werkplek_key FROM prs_perslidwerkplek);

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