Hi Folks,
This one is driving me nuts! I create a materialized view like so...
... and it works great, my table is populated as expected and looks great.
I then refresh the view (either via oracle job, or manually) like so:
This is a complete refresh, and take a while to run, but comes back with all the rows, but not all the columns. What I mean is, the columns are there, but all the values are null. The columns in particular have case statements like so:
It's just a simple thing to work out if it's an invoice or a credit note to reverse it from a positive/negative value.
Is there any trick with this ? .... it gets the correct data when I create the view, just not when I refresh it.
This one is driving me nuts! I create a materialized view like so...
Code:
CREATE MATERIALIZED VIEW DWH.MERGESALESFIGURES_JS_MV
TABLESPACE USERS
CACHE
LOGGING
NOCOMPRESS
PARALLEL ( DEGREE 2 INSTANCES 2 )
BUILD IMMEDIATE
REFRESH COMPLETE ON DEMAND
WITH PRIMARY KEY
AS
SELECT blah, blah
FROM table1, table2,table3
WHERE this = that;
... and it works great, my table is populated as expected and looks great.
I then refresh the view (either via oracle job, or manually) like so:
Code:
exec dbms_mview.refresh('DWH.MERGESALESFIGURES_JS_MV','C');
Code:
case when iHead.invs1_doc_type = 2 then
case when iLine.invsqty < 0 then abs(iLine.invsqty) else (0-iLine.invsqty) end
else iLine.invsqty end as Qty,
Is there any trick with this ? .... it gets the correct data when I create the view, just not when I refresh it.