BEBO#90084
svn path=/Customer/trunk/; revision=71078
This commit is contained in:
0
BEBO/.gitignore
vendored
0
BEBO/.gitignore
vendored
87
BEBO/bebo.sql
Normal file
87
BEBO/bebo.sql
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
--
|
||||||
|
-- $Id$
|
||||||
|
--
|
||||||
|
-- Script containing customer specific sql statements for the FACILITOR database
|
||||||
|
-- Voor dbuser invullen: - indien script voor 1 klant is: 'AADS' (de klantcode, zoals vermeld in fac_version_cust)
|
||||||
|
-- - script is voor meerdere klanten: 'AAXX' (de groepcode, zoals vermeld in fac_version_group)
|
||||||
|
-- - script is voor meerdere klanten met naam volgens een bepaald patroon: '^AA|^ASMS|^GULU|^NMMS|^RABO|^ZKHM'
|
||||||
|
-- Ook als het script gedraaid wordt voor de verkeerde cust wordt er een logfile gemaakt.
|
||||||
|
-- (dit in tegenstelling tot sample_xxxx.sql)
|
||||||
|
|
||||||
|
DEFINE thisfile = 'BEBO.SQL'
|
||||||
|
DEFINE dbuser = 'BEBO'
|
||||||
|
|
||||||
|
SET ECHO ON
|
||||||
|
SET DEFINE ON
|
||||||
|
COLUMN fcltlogfile NEW_VALUE fcltlogfile NOPRINT;
|
||||||
|
COLUMN fcltcusttxt NEW_VALUE fcltcusttxt NOPRINT;
|
||||||
|
WHENEVER SQLERROR CONTINUE;
|
||||||
|
SELECT adm.getscriptspoolfile('&thisfile') AS fcltlogfile FROM DUAL;
|
||||||
|
SPOOL &fcltlogfile
|
||||||
|
WHENEVER SQLERROR EXIT;
|
||||||
|
SELECT adm.checkscriptcust('&dbuser') AS fcltcusttxt FROM DUAL;
|
||||||
|
WHENEVER SQLERROR CONTINUE;
|
||||||
|
---------------------------------------
|
||||||
|
PROMPT &fcltcusttxt
|
||||||
|
---------------------------------------
|
||||||
|
SET DEFINE OFF
|
||||||
|
|
||||||
|
------ payload begin ------
|
||||||
|
|
||||||
|
CREATE OR REPLACE VIEW leidinggevende_lijst_locaties
|
||||||
|
(
|
||||||
|
prs_perslid_key,
|
||||||
|
naam,
|
||||||
|
personeelsnummer,
|
||||||
|
email,
|
||||||
|
bedrijfsnaam,
|
||||||
|
functieomschrijving
|
||||||
|
)
|
||||||
|
AS
|
||||||
|
SELECT
|
||||||
|
p.prs_perslid_key,
|
||||||
|
CASE
|
||||||
|
WHEN p.prs_perslid_tussenvoegsel IS NULL THEN
|
||||||
|
p.prs_perslid_voornaam
|
||||||
|
|| ' '
|
||||||
|
|| p.prs_perslid_naam
|
||||||
|
|| ' (' || sp.prs_srtperslid_omschrijving || ')'
|
||||||
|
ELSE
|
||||||
|
p.prs_perslid_voornaam
|
||||||
|
|| ' '
|
||||||
|
|| p.prs_perslid_tussenvoegsel
|
||||||
|
|| ' '
|
||||||
|
|| p.prs_perslid_naam
|
||||||
|
|| ' (' || sp.prs_srtperslid_omschrijving || ')'
|
||||||
|
END AS naam,
|
||||||
|
p.prs_perslid_nr,
|
||||||
|
p.prs_perslid_email,
|
||||||
|
b.prs_bedrijf_naam,
|
||||||
|
sp.prs_srtperslid_omschrijving AS functieomschrijving
|
||||||
|
FROM prs_perslid p
|
||||||
|
JOIN prs_srtperslid sp
|
||||||
|
ON p.prs_srtperslid_key = sp.prs_srtperslid_key
|
||||||
|
JOIN prs_v_afdeling a
|
||||||
|
ON p.prs_afdeling_key = a.prs_afdeling_key
|
||||||
|
JOIN prs_bedrijf b
|
||||||
|
ON a.prs_bedrijf_key = b.prs_bedrijf_key
|
||||||
|
WHERE
|
||||||
|
p.prs_perslid_verwijder IS NULL
|
||||||
|
AND (
|
||||||
|
INSTR(UPPER(sp.prs_srtperslid_omschrijving), 'LEIDINGGEVENDE') > 0
|
||||||
|
OR INSTR(UPPER(sp.prs_srtperslid_omschrijving), 'CLUSTERMANAGER') > 0
|
||||||
|
OR INSTR(UPPER(sp.prs_srtperslid_omschrijving), 'ASSISTENT LOCATIELEIDINGGEVENDE') > 0
|
||||||
|
OR INSTR(UPPER(sp.prs_srtperslid_omschrijving), 'TEAMLEIDER') > 0
|
||||||
|
);
|
||||||
|
|
||||||
|
------ 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
|
||||||
Reference in New Issue
Block a user