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

82 lines
2.8 KiB
SQL

INSERT INTO alg_onrgoedkenmerk (alg_onrgoed_key,
alg_onrgoed_niveau,
alg_kenmerk_key,
alg_onrgoedkenmerk_waarde)
SELECT alg_locatie_key,
'L',
1123,
'west'
FROM alg_locatie
WHERE UPPER (alg_locatie_omschrijving) LIKE '%KENTALIS%'
AND alg_locatie_code LIKE 'P%'
AND (alg_locatie_plaats IN
('Amsterdam',
'Assendelft',
'Rotterdam',
'Amersfoort',
'Zoetermeer',
'Hoogvliet',
'Almere',
'Utrecht',
'Goes',
'Alphen aan den Rijn'))
AND NOT EXISTS
(SELECT alg_onrgoedkenmerk_key
FROM alg_onrgoedkenmerk
WHERE alg_onrgoed_key = alg_locatie_key
AND alg_kenmerk_key = 1123);
INSERT INTO alg_onrgoedkenmerk (alg_onrgoed_key,
alg_onrgoed_niveau,
alg_kenmerk_key,
alg_onrgoedkenmerk_waarde)
SELECT alg_locatie_key,
'L',
1123,
'zuid-oost'
FROM alg_locatie
WHERE UPPER (alg_locatie_omschrijving) LIKE '%KENTALIS%'
AND alg_locatie_code LIKE 'P%'
AND (alg_locatie_plaats IN
('Velp',
'Arnhem',
'Silvolde',
'Nijmegen',
'Groesbeek',
'Eindhoven',
'Venlo',
'Hoensbroek',
'Maastricht'))
AND NOT EXISTS
(SELECT alg_onrgoedkenmerk_key
FROM alg_onrgoedkenmerk
WHERE alg_onrgoed_key = alg_locatie_key
AND alg_kenmerk_key = 1123);
INSERT INTO alg_onrgoedkenmerk (alg_onrgoed_key,
alg_onrgoed_niveau,
alg_kenmerk_key,
alg_onrgoedkenmerk_waarde)
SELECT alg_locatie_key,
'L',
1123,
'zuid-west'
FROM alg_locatie
WHERE UPPER (alg_locatie_omschrijving) LIKE '%KENTALIS%'
AND alg_locatie_code LIKE 'P%'
AND (alg_locatie_plaats IN
('Berlicum',
'Schijndel',
'St. Michielsgestel',
'Sint Michielsgestel',
'Sint-Michielsgestel',
'Sint-Michelsgestel',
'Vught',
'Breda'))
AND NOT EXISTS
(SELECT alg_onrgoedkenmerk_key
FROM alg_onrgoedkenmerk
WHERE alg_onrgoed_key = alg_locatie_key
AND alg_kenmerk_key = 1123);