--
-- $Id$
--
-- Foutieve import clienten

DEFINE thisfile = 'WZUV#57812_2.SQL'
DEFINE dbuser   = '^WZUV'

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

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

-- alle clienten die vandaag zijn ingelezen via de verkeerde import moeten weer verwijderd worden

DELETE PRS_PERSLID
 WHERE PRS_PERSLID_KEY IN
           (SELECT prs_perslid_key
              FROM prs_perslid
             WHERE     prs_srtperslid_key = 8561
                   AND TRUNC (prs_perslid_aanmaak) = TRUNC (SYSDATE));


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