Added Qmin and column comments to make it easier for other people.

git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@3263 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
mullenm
2008-01-16 14:46:43 +00:00
parent 25fd6ec5c3
commit 7864d2d918

View File

@@ -5,7 +5,7 @@
may be required.
*/
CREATE OR REPLACE VIEW V_QUOTE_DETAILS AS
SELECT "ENQUIRY_ID","QUOTE_ID","ENTY_CODE","MODULE_CODE","LEAD_TIME","ADDITIONAL_ITEMS","BAS_CODE","QMAX","INLET_ORIENTATION","OUTLET_ORIENTATION","TOTAL_COST","ROW_NUMBER"
SELECT *
FROM (SELECT q.enqu_id AS enquiry_id
,t.qute_id AS quote_id
,MAX(t.enty_code) over(PARTITION BY qute_id) AS enty_code
@@ -14,6 +14,7 @@ SELECT "ENQUIRY_ID","QUOTE_ID","ENTY_CODE","MODULE_CODE","LEAD_TIME","ADDITIONAL
,get_quote_items(qute_id) AS additional_items
,MAX(t.bas_code) over(PARTITION BY qute_id) AS bas_code
,MAX(t.qmax) over(PARTITION BY qute_id) AS qmax
,MAX(t.qmin) over(PARTITION BY qute_id) AS qmin
,MAX(t.inlet_orientation) over(PARTITION BY qute_id) AS inlet_orientation
,MAX(t.outlet_orientation) over(PARTITION BY qute_id) AS outlet_orientation
,SUM(nvl(t.selling_price
@@ -39,6 +40,7 @@ COMMENT ON COLUMN v_quote_details.lead_time IS 'The lead time for installation.
COMMENT ON COLUMN v_quote_details.additional_items IS 'Any additional items included in the quote.';
COMMENT ON COLUMN v_quote_details.bas_code IS 'The module base code.';
COMMENT ON COLUMN v_quote_details.qmax IS 'The meter module''s Q max.';
COMMENT ON COLUMN v_quote_details.qmin IS 'The meter module''s Q min.';
COMMENT ON COLUMN v_quote_details.inlet_orientation IS 'The orientation of the meter inlet.';
COMMENT ON COLUMN v_quote_details.outlet_orientation IS 'The orientatino of the meter outlet.';
COMMENT ON COLUMN v_quote_details.total_cost IS 'The total cost of the quote. This figure excludes any lifting gear or purging.';