Schema changes
New Tables: Quote_reasoning - record internal processes against quote additional_items - moved from within Costs Changed Tables: Costs Quote_items Bases Housings Quotes Meters Modules Views: As listed against this revision. git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@3057 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
CREATE OR REPLACE VIEW V_AICO AS
|
||||
SELECT aico_code
|
||||
,description
|
||||
SELECT id
|
||||
,adit_code
|
||||
,selling_price
|
||||
,cost_price
|
||||
,delivery_cost
|
||||
@@ -12,14 +12,14 @@ SELECT aico_code
|
||||
,nvl(next_valid_from
|
||||
,to_date('2099'
|
||||
,'yyyy'))) AS effective_to
|
||||
FROM (SELECT aico_code
|
||||
,description
|
||||
FROM (SELECT id
|
||||
,adit_code
|
||||
,selling_price
|
||||
,cost_price
|
||||
,delivery_cost
|
||||
,regi_code
|
||||
,valid_from
|
||||
,valid_to
|
||||
,lead(valid_from) over(PARTITION BY cost.AICO_code, regi_code ORDER BY valid_from) AS next_valid_from
|
||||
,lead(valid_from) over(PARTITION BY cost.adit_code, regi_code ORDER BY valid_from) AS next_valid_from
|
||||
FROM costs cost
|
||||
WHERE cost_type = 'AICO')
|
||||
WHERE cost_type = 'AICO');
|
||||
|
||||
Reference in New Issue
Block a user