UWVA#9699

svn path=/Database/trunk/; revision=9451
This commit is contained in:
Arthur Egberink
2007-02-02 14:03:06 +00:00
parent b3023515fe
commit 3de74973bc
3 changed files with 441 additions and 56 deletions

View File

@@ -1,7 +1,7 @@
#ifdef BES // 03-11-2000 PF
/* $Revision: 60 $
* $Modtime: 8-01-07 15:09 $
/* $Revision: 61 $
* $Modtime: 2-02-07 13:26 $
*/
[quotes]
@@ -591,21 +591,21 @@ END;
#ifndef MS_SQL
CREATE OR REPLACE PROCEDURE _MSSQL(WEB.)bes_p_update_catalogus (
pbes_impcatalogus_id IN VARCHAR2
pfac_imp_catalogus_id IN VARCHAR2
)
IS
CURSOR cgroep_omschrijving (ccatalog_id IN VARCHAR2)
IS
SELECT DISTINCT (ins_srtgroep_omschrijving) ins_srtgroep_omschrijving
FROM bes_impcatalogus
FROM fac_imp_catalogus
WHERE ins_srtgroep_omschrijving IS NOT NULL
AND bes_impcatalogus_id = UPPER (ccatalog_id);
AND fac_imp_catalogus_id = UPPER (ccatalog_id);
CURSOR cin_srtdeel (ccatalog_id IN VARCHAR2, cdiscipline_key IN NUMBER)
IS
SELECT *
FROM bes_impcatalogus f
WHERE bes_impcatalogus_id = UPPER (ccatalog_id)
FROM fac_imp_catalogus f
WHERE fac_imp_catalogus_id = UPPER (ccatalog_id)
AND f.ins_srtdeel_nr NOT IN (
SELECT s.ins_srtdeel_nr
FROM ins_srtdeel s, ins_srtgroep g
@@ -621,11 +621,11 @@ IS
f.ins_srtdeel_vervaldatum, f.ins_srtdeel_nr,
f.ins_srtgroep_omschrijving, f.prs_bedrijf_key,
s.ins_srtdeel_key
FROM ins_srtdeel s, ins_srtgroep g, bes_impcatalogus f
FROM ins_srtdeel s, ins_srtgroep g, fac_imp_catalogus f
WHERE g.ins_discipline_key = cdiscipline_key
AND g.ins_srtgroep_key = s.ins_srtgroep_key
AND s.ins_srtdeel_nr = UPPER(f.ins_srtdeel_nr)
AND bes_impcatalogus_id = UPPER (ccatalog_id)
AND fac_imp_catalogus_id = UPPER (ccatalog_id)
AND s.ins_srtdeel_verwijder IS NULL;
recgroep_omschrijving cgroep_omschrijving%ROWTYPE;
@@ -644,7 +644,7 @@ IS
BEGIN
errormsg := 'Fout bij opvragen parameter procedure.';
SELECT UPPER (pbes_impcatalogus_id)
SELECT UPPER (pfac_imp_catalogus_id)
INTO catalog_id
FROM DUAL;
@@ -654,8 +654,8 @@ BEGIN
SELECT DISTINCT (ins_discipline_key)
INTO discipline_key
FROM bes_impcatalogus
WHERE bes_impcatalogus_id = catalog_id;
FROM fac_imp_catalogus
WHERE fac_imp_catalogus_id = catalog_id;
-- INS_SRTDEEL: [delete objecttype]
errormsg := catalog_id || ' - Fout bij verwijderen artikelen.';
@@ -669,8 +669,8 @@ BEGIN
AND g.ins_srtgroep_key = s.ins_srtgroep_key
AND ins_srtdeel_nr NOT IN (
SELECT f.ins_srtdeel_nr
FROM bes_impcatalogus f
WHERE f.bes_impcatalogus_id = catalog_id))
FROM fac_imp_catalogus f
WHERE f.fac_imp_catalogus_id = catalog_id))
AND ins_srtdeel_verwijder IS NULL;
errormsg := catalog_id || ' - Fout bij creeren nieuwe artikelen-groepen.';
@@ -914,9 +914,9 @@ BEGIN
AND ins_discipline_key = discipline_key
AND NOT EXISTS (
SELECT *
FROM bes_impcatalogus f
FROM fac_imp_catalogus f
WHERE UPPER (f.ins_srtgroep_omschrijving) = UPPER (sg.ins_srtgroep_omschrijving)
AND bes_impcatalogus_id = UPPER(catalog_id));
AND fac_imp_catalogus_id = UPPER(catalog_id));
COMMIT;
EXCEPTION