--
-- $Id$
--
-- Zet fac_email_setting_attachpath zo veel mogelijk op '*flexfilespath'

DEFINE thisfile = 'AAIT#27699.SQL'
DEFINE dbuser   = '^AA|^ASMS|^GULU|^NMMS|^RABO|^ZKHM'

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

-- D:\Apps\Facilitor\AAFM_A\CUST\NMMS\flexfiles\ ==> *flexfilespath
UPDATE fac_email_setting
   SET fac_email_setting_attachpath = '*flexfilespath'
 WHERE LOWER(fac_email_setting_attachpath) = LOWER('D:\Apps\Facilitor\AAFM_A\CUST\' || SUBSTR(USER, 1, 4) || '\flexfiles\');

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