Bulk Load: Latest version of POSTCODES.csv.
Data/Seed and Data/Test: Correction to apau.ctl to remove duplicates. Modules/compile.sql: Correction to 'report' query. Schema/ext...: Check whether external tables have been defined before attempting to drop them. Schema/v_...: Force creation of views that rely on PL/SQL code. Explicitly name the column returned by V_QUOTE_DETAILS.vw so that the comments can be applied. git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@3452 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -32,10 +32,6 @@ MIPADMIN|30|P|A
|
|||||||
MIPADMIN|31|P|A
|
MIPADMIN|31|P|A
|
||||||
MIPADMIN|32|P|A
|
MIPADMIN|32|P|A
|
||||||
MIPADMIN|42|P|A
|
MIPADMIN|42|P|A
|
||||||
MIPADMIN|11|P|A
|
|
||||||
MIPADMIN|13|P|A
|
|
||||||
MIPADMIN|20|P|A
|
|
||||||
MIPADMIN|21|P|A
|
|
||||||
AGENT|11|P|A
|
AGENT|11|P|A
|
||||||
AGENT|32|P|A
|
AGENT|32|P|A
|
||||||
ICU|icadmin|C|A
|
ICU|icadmin|C|A
|
||||||
|
|||||||
@@ -30,10 +30,6 @@ MIPADMIN|30|P|A
|
|||||||
MIPADMIN|31|P|A
|
MIPADMIN|31|P|A
|
||||||
MIPADMIN|32|P|A
|
MIPADMIN|32|P|A
|
||||||
MIPADMIN|42|P|A
|
MIPADMIN|42|P|A
|
||||||
MIPADMIN|11|P|A
|
|
||||||
MIPADMIN|13|P|A
|
|
||||||
MIPADMIN|20|P|A
|
|
||||||
MIPADMIN|21|P|A
|
|
||||||
AGENT|11|P|A
|
AGENT|11|P|A
|
||||||
AGENT|32|P|A
|
AGENT|32|P|A
|
||||||
ICU|icadmin|C|A
|
ICU|icadmin|C|A
|
||||||
|
|||||||
@@ -28,4 +28,22 @@ REM Create the compilation report
|
|||||||
TTITLE SKIP 2 CENTER 'COMPILATION REPORT' SKIP 1
|
TTITLE SKIP 2 CENTER 'COMPILATION REPORT' SKIP 1
|
||||||
SET HEADING OFF
|
SET HEADING OFF
|
||||||
SELECT NULL FROM DUAL
|
SELECT NULL FROM DUAL
|
||||||
/
|
/
|
||||||
|
/
|
||||||
|
TTITLE OFF
|
||||||
|
SET HEADING ON
|
||||||
|
BREAK ON NAME SKIP 1 ON TYPE SKIP 1
|
||||||
|
|
||||||
|
SELECT
|
||||||
|
'' LABEL,
|
||||||
|
'E' RTYPE,
|
||||||
|
E.NAME,
|
||||||
|
DECODE (E.TYPE,'PACKAGE BODY','PB','PACKAGE','PS',TYPE) TYPE,
|
||||||
|
E.LINE ELINE,
|
||||||
|
E.SEQUENCE SEQ,
|
||||||
|
E.LINE DLINE,
|
||||||
|
TO_CHAR(E.POSITION) COL,
|
||||||
|
E.TEXT
|
||||||
|
FROM USER_ERRORS E
|
||||||
|
/
|
||||||
|
PROMPT &&LABEL_VALUE
|
||||||
@@ -5,7 +5,19 @@
|
|||||||
may be required.
|
may be required.
|
||||||
*/
|
*/
|
||||||
CREATE OR REPLACE FORCE VIEW V_QUOTE_DETAILS AS
|
CREATE OR REPLACE FORCE VIEW V_QUOTE_DETAILS AS
|
||||||
SELECT *
|
SELECT enquiry_id
|
||||||
|
,quote_id
|
||||||
|
,enty_code
|
||||||
|
,module_code
|
||||||
|
,lead_time
|
||||||
|
,additional_items
|
||||||
|
,bas_code
|
||||||
|
,hou_code
|
||||||
|
,qmax
|
||||||
|
,qmin
|
||||||
|
,inlet_orientation
|
||||||
|
,outlet_orientation
|
||||||
|
,total_cost
|
||||||
FROM (SELECT q.enqu_id AS enquiry_id
|
FROM (SELECT q.enqu_id AS enquiry_id
|
||||||
,t.qute_id AS quote_id
|
,t.qute_id AS quote_id
|
||||||
,MAX(t.enty_code) over(PARTITION BY qute_id) AS enty_code
|
,MAX(t.enty_code) over(PARTITION BY qute_id) AS enty_code
|
||||||
@@ -24,8 +36,9 @@ SELECT *
|
|||||||
,row_number() over(PARTITION BY qute_id ORDER BY qute_id) AS row_number
|
,row_number() over(PARTITION BY qute_id ORDER BY qute_id) AS row_number
|
||||||
FROM quote_items t
|
FROM quote_items t
|
||||||
,quotes q
|
,quotes q
|
||||||
WHERE t.qute_id = q.ID
|
WHERE t.qute_id = q.id
|
||||||
and not (quit_type = 'AQI' and adit_code in ('LIFTING GEAR','PURGING'))
|
AND NOT (quit_type = 'AQI' AND
|
||||||
|
adit_code IN ('LIFTING GEAR', 'PURGING'))
|
||||||
ORDER BY enqu_id
|
ORDER BY enqu_id
|
||||||
,quote_id
|
,quote_id
|
||||||
,t.id) all_quote_items
|
,t.id) all_quote_items
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
DROP TABLE ext_bases
|
BEGIN
|
||||||
|
FOR l_rec IN (SELECT 1
|
||||||
|
FROM user_tables
|
||||||
|
WHERE table_name = 'EXT_BASES') LOOP
|
||||||
|
EXECUTE IMMEDIATE 'DROP TABLE ext_bases';
|
||||||
|
END LOOP;
|
||||||
|
END;
|
||||||
/
|
/
|
||||||
create table ext_bases
|
create table ext_bases
|
||||||
(
|
(
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
DROP TABLE ext_caveats
|
BEGIN
|
||||||
|
FOR l_rec IN (SELECT 1
|
||||||
|
FROM user_tables
|
||||||
|
WHERE table_name = 'EXT_CAVEATS') LOOP
|
||||||
|
EXECUTE IMMEDIATE 'DROP TABLE ext_caveats';
|
||||||
|
END LOOP;
|
||||||
|
END;
|
||||||
/
|
/
|
||||||
create table ext_caveats
|
create table ext_caveats
|
||||||
(
|
(
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
DROP TABLE ext_costs
|
BEGIN
|
||||||
|
FOR l_rec IN (SELECT 1
|
||||||
|
FROM user_tables
|
||||||
|
WHERE table_name = 'EXT_COSTS') LOOP
|
||||||
|
EXECUTE IMMEDIATE 'DROP TABLE ext_costs';
|
||||||
|
END LOOP;
|
||||||
|
END;
|
||||||
/
|
/
|
||||||
create table ext_costs
|
create table ext_costs
|
||||||
(
|
(
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
DROP TABLE ext_dataitem_roles
|
BEGIN
|
||||||
|
FOR l_rec IN (SELECT 1
|
||||||
|
FROM user_tables
|
||||||
|
WHERE table_name = 'EXT_DATAITEM_ROLES') LOOP
|
||||||
|
EXECUTE IMMEDIATE 'DROP TABLE ext_dataitem_roles';
|
||||||
|
END LOOP;
|
||||||
|
END;
|
||||||
/
|
/
|
||||||
create table ext_dataitem_roles
|
create table ext_dataitem_roles
|
||||||
(
|
(
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
DROP TABLE ext_housings
|
BEGIN
|
||||||
|
FOR l_rec IN (SELECT 1
|
||||||
|
FROM user_tables
|
||||||
|
WHERE table_name = 'EXT_HOUSINGS') LOOP
|
||||||
|
EXECUTE IMMEDIATE 'DROP TABLE ext_housings';
|
||||||
|
END LOOP;
|
||||||
|
END;
|
||||||
/
|
/
|
||||||
create table ext_housings
|
create table ext_housings
|
||||||
(
|
(
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
DROP TABLE ext_meters
|
BEGIN
|
||||||
|
FOR l_rec IN (SELECT 1
|
||||||
|
FROM user_tables
|
||||||
|
WHERE table_name = 'EXT_METERS') LOOP
|
||||||
|
EXECUTE IMMEDIATE 'DROP TABLE ext_meters';
|
||||||
|
END LOOP;
|
||||||
|
END;
|
||||||
/
|
/
|
||||||
create table ext_meters
|
create table ext_meters
|
||||||
(
|
(
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
DROP TABLE ext_MODULES
|
BEGIN
|
||||||
|
FOR l_rec IN (SELECT 1
|
||||||
|
FROM user_tables
|
||||||
|
WHERE table_name = 'EXT_MODULES') LOOP
|
||||||
|
EXECUTE IMMEDIATE 'DROP TABLE ext_modules';
|
||||||
|
END LOOP;
|
||||||
|
END;
|
||||||
/
|
/
|
||||||
create table ext_MODULES
|
create table ext_MODULES
|
||||||
(
|
(
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
DROP TABLE ext_postcodes
|
BEGIN
|
||||||
|
FOR l_rec IN (SELECT 1
|
||||||
|
FROM user_tables
|
||||||
|
WHERE table_name = 'EXT_POSTCODES') LOOP
|
||||||
|
EXECUTE IMMEDIATE 'DROP TABLE ext_postcodes';
|
||||||
|
END LOOP;
|
||||||
|
END;
|
||||||
/
|
/
|
||||||
create table ext_postcodes
|
create table ext_postcodes
|
||||||
(
|
(
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
DROP TABLE gtt_dir_list
|
BEGIN
|
||||||
|
FOR l_rec IN (SELECT 1
|
||||||
|
FROM user_tables
|
||||||
|
WHERE table_name = 'GTT_DIR_LIST') LOOP
|
||||||
|
EXECUTE IMMEDIATE 'DROP TABLE gtt_dir_list';
|
||||||
|
END LOOP;
|
||||||
|
END;
|
||||||
/
|
/
|
||||||
create GLOBAL temporary table gtt_dir_list
|
create GLOBAL temporary table gtt_dir_list
|
||||||
(filename varchar2(255) ,filelength NUMBER, filetype VARCHAR2(255), filemodified DATE)
|
(filename varchar2(255) ,filelength NUMBER, filetype VARCHAR2(255), filemodified DATE)
|
||||||
|
|||||||
@@ -38,4 +38,4 @@ SELECT qute_id
|
|||||||
,8)) over(PARTITION BY qute_id) AS max_event
|
,8)) over(PARTITION BY qute_id) AS max_event
|
||||||
FROM quote_events)
|
FROM quote_events)
|
||||||
WHERE this_event = max_event
|
WHERE this_event = max_event
|
||||||
/
|
/
|
||||||
|
|||||||
Reference in New Issue
Block a user