Files
Customer/onces/WEHK/wehk_update_cnt_soorten.sql
Peter Koerhuis 3b8d7f1dcc Migratie once-scripts van /branch naar /onces
svn path=/Customer/; revision=21207
2014-04-02 13:57:31 +00:00

53 lines
3.1 KiB
SQL

-- Customer specific once-script to update the 'contractsoort' (ins_discipline) of many
-- contracts (ie. the non-facility contracts).
-- (c) 2008 SG|facilitor bv
-- $Revision$
-- $Id$
--
-- Support: +31 53 4800700
SET ECHO ON;
SPOOL xwehk_update_cnt_soorten.lst;
UPDATE cnt_contract c
SET c.ins_discipline_key =
DECODE (c.prs_afdeling_key_eig,
64, 761, --166300 -> Lacent
71, 801, --99999 -> HRM
104, 802, --126717 -> ICT
105, 802, --126741 -> ICT
208, 802, --126743 -> ICT
107, 802, --126744 -> ICT
220, 821, --126960 -> Directie
109, 821, --126961 -> Directie
211, 822, --126810 -> INM
218, 823, --126735 -> Finance
219, 604, --126970 -> Allianties
65, 781, --126001 -> Fashion
182, 781, --126206 -> Fashion
66, 782, --126002 -> Hardware
184, 782, --126208 -> Hardware
93, 782, --126221 -> Hardware
190, 782, --126226 -> Hardware
191, 782, --126227 -> Hardware
67, 783, --126003 -> Living
187, 783, --126233 -> Living
69, 784, --126005 -> Marketing Services
201, 784, --126117 -> Marketing Services
202, 784, --126120 -> Marketing Services
203, 784, --126130 -> Marketing Services
88, 784, --126137 -> Marketing Services
204, 784, --126138 -> Marketing Services
205, 784, --126139 -> Marketing Services
68, 784, --126004 -> Marketing Services
228, 841, --126314 -> Operations
111, 841, --126317 -> Operations
101, 841, --126460 -> Operations
102, 841, --126500 -> Operations
209, 841, --126800 -> Operations
-1
)
WHERE c.prs_afdeling_key_eig NOT IN (62, 108);
COMMIT;
SPOOL OFF;