-- Customer specific once-script to update the status of all RFQs (mld_typeopdr_key = 4) from afgemeld (key =6) to afgerond (key =9)
--
-- Support: +31 53 4800700

SET ECHO ON
SPOOL xAADO27103.lst
SET DEFINE OFF

UPDATE   mld_opdr
   SET   mld_statusopdr_key = 9 
 WHERE       mld_typeopdr_key = 4  
         AND fac_activiteit_key IS NULL
         AND mld_opdr_einddatum < TO_DATE ('01-01-2013', 'DD-MM-YYYY')
         AND mld_statusopdr_key = 6;  

COMMIT;

SPOOL OFF