ASTE#39817 Report for Astellas UK
svn path=/Customer/trunk/; revision=33289
This commit is contained in:
129
ASTE/aste.sql
129
ASTE/aste.sql
@@ -1,9 +1,20 @@
|
||||
-- Script containing customer specific db-configuration for ASTE.
|
||||
-- (c) 2015 Facilitor B.V.
|
||||
--
|
||||
-- Support: +31 53 4800700
|
||||
set echo on
|
||||
spool xaste.lst
|
||||
-- $Id$
|
||||
--
|
||||
-- Script containing customer specific sql statements for Astellas
|
||||
|
||||
DEFINE thisfile = 'ASTE.SQL'
|
||||
DEFINE dbuser = '^ASTE'
|
||||
DEFINE custid = 'ASTE'
|
||||
|
||||
SET ECHO ON
|
||||
SET DEFINE ON
|
||||
COLUMN fcltlogfile NEW_VALUE fcltlogfile NOPRINT;
|
||||
WHENEVER SQLERROR EXIT;
|
||||
SELECT adm.scriptspoolfile('&dbuser', '&thisfile') AS fcltlogfile FROM DUAL;
|
||||
WHENEVER SQLERROR CONTINUE;
|
||||
SPOOL &fcltlogfile
|
||||
SET DEFINE OFF
|
||||
|
||||
CREATE OR REPLACE VIEW aste_v_rap_import_log
|
||||
(
|
||||
@@ -170,9 +181,107 @@ BEGIN
|
||||
END aste_update_prs;
|
||||
/
|
||||
|
||||
BEGIN adm.systrackscriptId('$Id$', 0); END;
|
||||
CREATE OR REPLACE VIEW aste_v_rap_meldingenbeh
|
||||
(
|
||||
call_number,
|
||||
mld_melding_datum,
|
||||
call_date,
|
||||
call_time,
|
||||
end_date,
|
||||
place,
|
||||
building,
|
||||
FLOOR,
|
||||
room_descr,
|
||||
room_nr,
|
||||
discipline_type,
|
||||
fclt_3d_discipline_key,
|
||||
discipline,
|
||||
call,
|
||||
description,
|
||||
requestor,
|
||||
status,
|
||||
update_dat,
|
||||
update_name,
|
||||
update_desc
|
||||
)
|
||||
AS
|
||||
SELECT m.mld_melding_key,
|
||||
mld_melding_datum,
|
||||
TO_CHAR (mld_melding_datum, 'DD-MM-YYYY') mld_datum,
|
||||
TO_CHAR (mld_melding_datum, 'HH24:MI') mld_time,
|
||||
mld_melding_einddatum,
|
||||
aog.alg_plaatsaanduiding,
|
||||
aog.alg_gebouw_naam,
|
||||
aog.alg_verdieping_code,
|
||||
aog.alg_ruimte_omschrijving,
|
||||
aog.alg_ruimte_nr,
|
||||
ins_srtdiscipline_omschrijving,
|
||||
ins_discipline_key,
|
||||
ins_discipline_omschrijving,
|
||||
mld_stdmelding_omschrijving,
|
||||
mld_melding_omschrijving,
|
||||
pf.prs_perslid_naam_full,
|
||||
mld_statuses_omschrijving,
|
||||
TO_CHAR (behand.datum, 'DD-MM-YYYY HH24:MI') dat,
|
||||
behand.naam,
|
||||
COALESCE (behand.omschr, behand.def_track)
|
||||
FROM mld_melding m,
|
||||
mld_stdmelding std,
|
||||
mld_discipline d,
|
||||
ins_srtdiscipline sd,
|
||||
mld_statuses st,
|
||||
prs_v_perslid_fullnames_all pf,
|
||||
alg_v_allonrgoed_gegevens aog,
|
||||
(SELECT n.mld_melding_note_aanmaak datum,
|
||||
n.mld_melding_note_key,
|
||||
pf.prs_perslid_naam_friendly naam,
|
||||
n.mld_melding_note_omschrijving omschr,
|
||||
NULL def_track,
|
||||
mld_melding_key
|
||||
FROM mld_melding_note n, prs_v_perslid_fullnames_all pf
|
||||
WHERE n.prs_perslid_key = pf.prs_perslid_key(+)
|
||||
UNION
|
||||
SELECT tr.fac_tracking_datum,
|
||||
tr.fac_tracking_key,
|
||||
pf.prs_perslid_naam_friendly,
|
||||
tr.fac_tracking_oms,
|
||||
DECODE (str.fac_srtnotificatie_code,
|
||||
'MLDNEW', lcl.l ('lcl_mld_is_mldnew'),
|
||||
'MLDING', lcl.l ('lcl_mld_is_mlding'),
|
||||
'MLDDOO', lcl.l ('lcl_mld_is_mlddoo'),
|
||||
'MLDDFWD', lcl.l ('lcl_mld_is_mldfwd'),
|
||||
'MLDDBWD', lcl.l ('lcl_mld_is_mldbwd'),
|
||||
'MLDUPD', lcl.l ('lcl_mld_is_mldupd'),
|
||||
'MLDACP', lcl.l ('lcl_mld_is_mldacp'),
|
||||
'MLDBEH', lcl.l ('lcl_mld_is_mldbeh'),
|
||||
'MLDREJ', lcl.l ('lcl_mld_is_mldrej'),
|
||||
'MLDAFM', lcl.l ('lcl_mld_is_mldafm'),
|
||||
'MLDer', lcl.l ('lcl_mld_is_mldver'),
|
||||
'MLDNOT', lcl.l ('lcl_mld_is_mldnot'))
|
||||
def_track,
|
||||
fac_tracking_refkey
|
||||
FROM fac_tracking tr,
|
||||
fac_srtnotificatie str,
|
||||
prs_v_perslid_fullnames_all pf
|
||||
WHERE tr.fac_srtnotificatie_key = str.fac_srtnotificatie_key
|
||||
AND tr.prs_perslid_key = pf.prs_perslid_key(+)
|
||||
AND str.fac_srtnotificatie_code <> 'MLDNOT'
|
||||
AND str.fac_srtnotificatie_xmlnode IN ('melding')) behand
|
||||
WHERE m.mld_stdmelding_key = std.mld_stdmelding_key
|
||||
AND d.ins_discipline_key = std.mld_ins_discipline_key
|
||||
AND d.ins_srtdiscipline_key = sd.ins_srtdiscipline_key
|
||||
AND m.prs_perslid_key = pf.prs_perslid_key
|
||||
AND aog.alg_onroerendgoed_keys = m.mld_alg_onroerendgoed_keys
|
||||
AND behand.mld_melding_key(+) = m.mld_melding_key
|
||||
AND st.mld_statuses_key = m.mld_melding_status
|
||||
AND fac_activiteit_key IS NULL;
|
||||
|
||||
SET DEFINE OFF
|
||||
BEGIN adm.systrackscriptId ('$Id$', 0); END;
|
||||
/
|
||||
BEGIN fac.registercustversion('ASTE', 1); END;
|
||||
/
|
||||
commit;
|
||||
spool off
|
||||
|
||||
COMMIT;
|
||||
SET ECHO OFF
|
||||
SPOOL OFF
|
||||
SET DEFINE ON
|
||||
PROMPT Logfile of this upgrade is: &fcltlogfile
|
||||
Reference in New Issue
Block a user