-- Verplaatst alle gebouwen naar één locatie
-- $Revision$
-- $Id$

SET ECHO ON;
SPOOL xnybu25028.sql

UPDATE alg_locatie
   SET alg_locatie_code = 'NBU',
       alg_locatie_omschrijving = 'Nyenrode'
 WHERE alg_locatie_key = 29;

UPDATE alg_gebouw
   SET alg_locatie_key = 29;

UPDATE alg_terreinsector
   SET alg_locatie_key = 29;

UPDATE alg_srtruimte_locatiegebouw
   SET alg_locatie_key = 29
 WHERE alg_locatie_key IS NOT NULL;

UPDATE mld_melding
   SET mld_alg_locatie_key = 29
 WHERE mld_alg_locatie_key IS NOT NULL;

UPDATE mld_opdr
   SET mld_alg_locatie_key = 29
 WHERE mld_alg_locatie_key IS NOT NULL;
   
UPDATE mld_adres
   SET alg_locatie_key = 29
 WHERE alg_locatie_key IS NOT NULL;

UPDATE ins_deel
   SET ins_alg_locatie_key = 29
 WHERE ins_alg_locatie_key IS NOT NULL;

UPDATE prs_contactpersoon_locatie
   SET alg_locatie_key = 29
 WHERE alg_locatie_key IS NOT NULL;

UPDATE prs_bedrijfdienstlocatie
   SET alg_locatie_key = 29
 WHERE alg_locatie_key IS NOT NULL;

UPDATE bez_afspraak
   SET alg_locatie_key = 29
 WHERE alg_locatie_key IS NOT NULL;
 
UPDATE cad_tekening
   SET alg_locatie_key = 29
 WHERE alg_locatie_key IS NOT NULL;

DELETE alg_locatie
 WHERE alg_locatie_key != 29;

COMMIT;
SPOOL OFF;