Order by in MATERIALIZED VIEW not work successfully with first column (ID)

Dears,
I am trying to create a Materialized View as below:
CREATE MATERIALIZED VIEW HR.MV_EMP
PCTFREE 10
MAXTRANS 255
TABLESPACE users
STORAGE (
INITIAL 65536
MINEXTENTS 1
MAXEXTENTS 2147483645
BUILD IMMEDIATE
REFRESH ON DEMAND
AS
SELECT *
FROM employees
where rownum < 5000 order by employee_id desc ;But while querying the MATERIALIZED VIEW, it did not work successfully as the data did not appear in the accurate order.
I tried to create the same MATERIALIZED VIEW but order by another column (Column Date), it worked successfully and the data appeared in the accurate order.
It means that MATERIALIZED VIEW not work successfully with the first column (id).
Can you please help me in this ?
Thanks & regards,,

A few pointers :
1. As has been pointed out, the ROWNUM has been incorrectly placed. ROWNUM values are assigned as rows are fetched from the source before the ORDER BY. You need to ORDER BY first (in a SubQuery) and then ROWNUM afterwards (outside the SubQuery).
2. I wonder why you want only the last 5000 EMPLOYEE_IDs. What if Employee_ID 1 is still an active employee (he is the founder, first employee and CEO ?). There could be very many "low" EMPLOYEE_IDs that are still active.
3. Logically I would expect some filter other than the ROWNUM ... ORDER BY to be used to select candidate rows. Then, an ORDER BY in the CREATE query would be unnecessary.
4. When querying the Materialized View you must explicitly ORDER BY (irrespective of whether you did or did not do an ORDER BY in the CREATE ...)
5. How do you expect to refresh the MV ? Will it always be a COMPLETE Refresh ? Remember that your "5000 employees" filter would likely exclude older employees at the next refresh. If you use some other filter, it should be consistent across all refreshs.
Hemant K Chitale

Similar Messages

  • Job with materialized view not working anymore

    I'm on windows 2008 server with 10.2.0.4
    I have a job that was running at every hour in the database that was refreshing some materialized view (refresh group) the sql query on that MV goes by dblink to another database.
    Le atrget database had crashed last thursday since then the job on my first database do not execute.
    I tried to start the job in TOAD but it does nothing.... Le last refresh date still on thurday.
    Here are my script :
    DECLARE
    X NUMBER;
    BEGIN
    SYS.DBMS_JOB.SUBMIT
    ( job => X
    ,what => 'dbms_refresh.refresh(''"EREGROUPEMENT_TEMP"."VM_CANTOR_CREDENTIALS"'');'
    ,next_date => to_date('20-09-2010 13:17:21','dd/mm/yyyy hh24:mi:ss')
    ,interval => 'sysdate + 60/(60*24) '
    ,no_parse => FALSE
    SYS.DBMS_OUTPUT.PUT_LINE('Job Number is: ' || to_char(x));
    COMMIT;
    END;
    DECLARE
    SnapArray SYS.DBMS_UTILITY.UNCL_ARRAY;
    JobNo Number;
    BEGIN
    SnapArray(1) := 'EREGROUPEMENT_TEMP.VM_CANTOR_CREDENTIALS';
    SnapArray(2) := 'EREGROUPEMENT_TEMP.VM_CANTOR_CV';
    SnapArray(3) := 'EREGROUPEMENT_TEMP.VM_CANTOR_DIS_CV';
    SnapArray(4) := 'EREGROUPEMENT_TEMP.VM_CANTOR_FINANCEMENT';
    SnapArray(5) := 'EREGROUPEMENT_TEMP.VM_CANTOR_FORM_ETUD_STAG';
    SnapArray(6) := 'EREGROUPEMENT_TEMP.VM_CANTOR_MOTS_CLES';
    SnapArray(7) := 'EREGROUPEMENT_TEMP.VM_CANTOR_OBR_CV';
    SnapArray(8) := 'EREGROUPEMENT_TEMP.VM_CANTOR_ORGANISME';
    SnapArray(9) := 'EREGROUPEMENT_TEMP.VM_CANTOR_SCHA_CV';
    SnapArray(10) := NULL;
    SYS.DBMS_REFRESH.MAKE (
    name => 'EREGROUPEMENT_TEMP.VM_CANTOR_CREDENTIALS'
    ,tab => SnapArray
    ,next_date => TO_DATE('01/01/4000 00:00:00', 'MM/DD/YYYY HH24:MI:SS')
    ,interval => 'SYSDATE + 60/(60*24)'
    ,implicit_destroy => TRUE
    ,lax => TRUE
    ,job => 0
    ,rollback_seg => NULL
    ,push_deferred_rpc => TRUE
    ,refresh_after_errors => FALSE
    ,purge_option => 1
    ,parallelism => 0
    ,heap_size => 0
    select job
    into JobNo
    from all_refresh
    where rowner = 'EREGROUPEMENT_TEMP'
    and rname = 'VM_CANTOR_CREDENTIALS';
    SYS.DBMS_JOB.BROKEN(JobNo,TRUE);
    Commit;
    END;
    Info on the MV :
    Last Refresh 2010-09-16 17:39:25
    Next Refresh SYSDATE + 60/(60*24)
    Refresh Type FORCE
    Refresh Mode Refresh Mode
    Start With 2010-09-16 18:39:25
    Do I have to refresh COMPLETE all the VIEWS MANUALLY and the recreate the refresh group or something wrong?

    RUN Procedure
    This procedure runs job JOB now. It runs it even if it is broken.
    Running the job recomputes next_date. See view user_jobs.
    Syntax
    DBMS_JOB.RUN (
    job IN BINARY_INTEGER,
    force IN BOOLEAN DEFAULT FALSE);
    Parameters
    It only change the next_date but it won't run.
    It tell me next date is in an hour but after an hour nothing has changed
    Edited by: Jpmill on 20 sept. 2010 11:32

  • Auto To working for one material and not working for other material

    Hi,
    Hope everybody is doing fine.
    I have configured the auto TO. Its working fine for one material and not working for the other material. I checked the material master and wm 1,2 views have the same fileds / values. What could be wrong?
    I didn't setup the back ground processing job. Is that is affecting it?
    thanks for any help.
    regrads,
    KHAN

    Thnaks,
    You are right but then what could be wrong? Its working for one material and not working for otehr material? Any clue?
    Appreciate your time charlie

  • Materialized view not properly refreshing

    Hi,
    As materialized view is not refreshing properly. we compare the sum of hashcode materialized view with the sum of hash code of the base view or table the materialized view is defined. If it's found equal then materialized view got refreshed succesfully else not.
    But in below example the column value is interchanged in between the row eventhough hashcode is same.
    Is there any other way to find the materialized view got refreshed successfully or not.
    SQL> create table temp as select object_name, subobject_name from user_objects where rownum<3;
    Table created
    SQL> select * from temp;
    OBJECT_NAME SUBOBJECT_NAME
    ATP_BN_I_1
    ATP_START_END_DATE_I_2
    SQL> create materialized view mv1 as select * from temp;
    Materialized view created
    SQL> select * from mv1;
    OBJECT_NAME SUBOBJECT_NAME
    ATP_BN_I_1
    ATP_START_END_DATE_I_2
    SQL> select sum(nvl(ora_hash("OBJECT_NAME"||"SUBOBJECT_NAME"),0)) from temp;
    SUM(NVL(ORA_HASH("OBJECT_NAME"
    4852176374
    SQL> select sum(nvl(ora_hash("OBJECT_NAME"||"SUBOBJECT_NAME"),0)) from MV1;
    SUM(NVL(ORA_HASH("OBJECT_NAME"
    4852176374
    SQL> UPDATE TEMP SET OBJECT_NAME=SUBOBJECT_NAME,SUBOBJECT_NAME=OBJECT_NAME;
    2 rows updated
    SQL> COMMIT;
    Commit complete
    SQL> select * from mv1;
    OBJECT_NAME SUBOBJECT_NAME
    ATP_BN_I_1
    ATP_START_END_DATE_I_2
    SQL> select * from temp;
    OBJECT_NAME SUBOBJECT_NAME
    ATP_BN_I_1
    ATP_START_END_DATE_I_2
    SQL> select sum(nvl(ora_hash("OBJECT_NAME"||"SUBOBJECT_NAME"),0)) from MV1;
    SUM(NVL(ORA_HASH("OBJECT_NAME"
    4852176374
    SQL> select sum(nvl(ora_hash("object_name"||"subobject_name"),0)) from temp;
    select sum(nvl(ora_hash("object_name"||"subobject_name"),0)) from temp
    ORA-00904: "subobject_name": invalid identifier
    SQL> select sum(nvl(ora_hash("OBJECT_NAME"||"SUBOBJECT_NAME"),0)) from temp;
    SUM(NVL(ORA_HASH("OBJECT_NAME"
    4852176374
    Any help really appreciated.
    Thanks in advance.

    unique wrote:
    Is there any other way to find the materialized view got refreshed successfully or not.You can look at the last_refresh_date and staleness columns of all_mviews: http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_1105.htm#REFRN20139
    Or maybe use the all_mview_refresh_times view: http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_1104.htm#sthref1068
    Regards,
    Rob.

  • Order by rDate desc is not working

    Hello,
    order by rDate desc is not working in my following query
    select cv_id,to_char(rDate,'Month dd, yyyy') from jobResponses 
    where job_id=35 and (responseStatus=1 OR responseStatus=2) order by rDate desc
    March     03, 2012
    March     03, 2012
    March     04, 0012Thanks in anitcipation

    Christy H. wrote:
    order by rDate desc is not working in my following queryWell, it works just fine. Last rDate year is 0012, that's why it is the last one. It looks like table data wasn't loaded correctly and you ended up having rows with year 12 instead of 2012. Check table data.
    SY.

  • PDF Viewer Not Working Some Scanned PDF Files.

    I Have Firefox Latest Version. I Want To View PDF files in Firefox without downloading them. But Firefox PDF Viewer Not Working Scanned PDF. Other Browsers Can View It.
    http://t.co/teYs9LOtyq
    This Is A Serious Problem & Please Fix This Issue.
    Thank You.

    Same problem. Am using Firefox 24 (W7x64).
    I've tried setting it to use the built-in PDF viewer, to always asking, to using Adobe plugin, to using Nitro plugin.
    I changed the pdfjs.disabled in about:config to true but that didn't help.
    The plugin.disable_full_page_plugin_for_types was set to
    user set string ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    I changed it to default, string but that didn't help either.
    The pdfjs.database is set to {"files":[{"fingerprint":"a217d02eee11bdca6fa87ec7d192fd7","exists":true,"page":1,"zoom":"auto","scrollLeft":0,"scrollTop":800},{"fingerprint":"2fc235a8bd85f838d74c927cfcd9842","exists":true,"page":2,"zoom":"auto","scrollLeft":0,"scrollTop":587},{"fingerprint":"c839bb8d692bce1ea48d681a35741e49","exists":true,"page":1,"zoom":"auto","scrollLeft":0,"scrollTop":792},{"fingerprint":"3dc145587d24022921d7e241bc3a5","exists":true,"page":35,"zoom":80,"scrollLeft":360,"scrollTop":707},{"fingerprint":"18a76da679de944893795ed1e4a136","exists":true,"page":2,"zoom":110.00000000000001,"scrollLeft":0,"scrollTop":662},{"fingerprint":"d8270f838618eeca6ea969e255b239f","exists":true,"page":24,"zoom":"auto","scrollLeft":0,"scrollTop":51},{"fingerprint":"443a32303133303630333137313132342d303427303027","exists":true,"page":1,"zoom":"auto","scrollLeft":0,"scrollTop":772},{"fingerprint":"443a32303133303631303135343033332d303427303027","exists":true,"page":1,"zoom":"auto","scrollLeft":0,"scrollTop":772},{"fingerprint":"443a32303133303631303132323731332d303427303027","exists":true,"page":1,"zoom":"auto","scrollLeft":0,"scrollTop":772},{"fingerprint":"443a32303133303631373133313733372d303427303027","exists":true,"page":1,"zoom":150,"scrollLeft":0,"scrollTop":772},{"fingerprint":"591aede8aeea4ade9612674263eaf4a2","exists":true,"page":1,"zoom":"auto","scrollLeft":0,"scrollTop":772},{"fingerprint":"443a32303133303830353132353132372d303427303027","exists":true,"page":1,"zoom":"auto","scrollLeft":0,"scrollTop":772},{"fingerprint":"8bf283ba7a5cc5479db8405215d67d3","exists":true,"page":1,"zoom":"auto","scrollLeft":0,"scrollTop":1008},{"fingerprint":"768e8216a07384f961d92204d6a1ef8","exists":true,"page":1,"zoom":"auto","scrollLeft":0,"scrollTop":800},{"fingerprint":"a4649ba52b2dcd144b35b9bd5c10a7","exists":true,"page":52,"zoom":"auto","scrollLeft":0,"scrollTop":290},{"fingerprint":"d612d5d934c66f4aa936b5b0a6cce91","exists":true,"page":18,"zoom":"auto","scrollLeft":0,"scrollTop":168},{"fingerprint":"de55bb394d87ed4cb8dd7584c4b68f61","exists":true,"page":1,"zoom":"auto","scrollLeft":0,"scrollTop":612},{"fingerprint":"fd4b802248d8a94e825747cf2ba32e2f","exists":true,"page":4,"zoom":"auto","scrollLeft":0,"scrollTop":109},{"fingerprint":"229e846140d9925da79a11f7d6cae","exists":true,"page":1,"zoom":"auto","scrollLeft":0,"scrollTop":800}]}

  • Lomboz J2EE View not working

    Lomboz J2EE View not working always give such type error
    java.lang.NoClassDefFoundError: org/apache/jasper/Options
         at com.objectlearn.jdt.j2ee.core.Project.initContainers(Project.java:370)
         at com.objectlearn.jdt.j2ee.core.Project.init(Project.java:102)
         at com.objectlearn.jdt.j2ee.core.Project.<init>(Project.java:43)
         at com.objectlearn.jdt.j2ee.core.Project.getWorkspaceProjects(Project.java:427)
         at com.objectlearn.jdt.j2ee.ui.ContainerView.init(ContainerView.java:334)
         at com.objectlearn.jdt.j2ee.ui.ContainerView.<init>(ContainerView.java:99)
         at com.objectlearn.jdt.j2ee.ui.J2EEView.createViews(J2EEView.java:241)
         at com.objectlearn.jdt.j2ee.ui.J2EEView.createSashForm(J2EEView.java:262)
         at com.objectlearn.jdt.j2ee.ui.J2EEView.createPartControl(J2EEView.java:306)
         at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:370)
         at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:227)
         at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:592)
         at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:299)
         at org.eclipse.ui.internal.ViewPane.setVisible(ViewPane.java:531)
         at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:179)
         at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:268)
         at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
         at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:400)
         at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1256)
         at org.eclipse.ui.internal.PartStack.createControl(PartStack.java:668)
         at org.eclipse.ui.internal.PartStack.createControl(PartStack.java:576)
         at org.eclipse.ui.internal.PartSashContainer.createControl(PartSashContainer.java:564)
         at org.eclipse.ui.internal.PerspectiveHelper.activate(PerspectiveHelper.java:270)
         at org.eclipse.ui.internal.Perspective.onActivate(Perspective.java:931)
         at org.eclipse.ui.internal.WorkbenchPage.setPerspective(WorkbenchPage.java:3479)
         at org.eclipse.ui.internal.WorkbenchPage.busySetPerspective(WorkbenchPage.java:997)
         at org.eclipse.ui.internal.WorkbenchPage.access$18(WorkbenchPage.java:981)
         at org.eclipse.ui.internal.WorkbenchPage$18.run(WorkbenchPage.java:3578)
         at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
         at org.eclipse.ui.internal.WorkbenchPage.setPerspective(WorkbenchPage.java:3576)
         at org.eclipse.ui.internal.PerspectiveBarContributionItem.select(PerspectiveBarContributionItem.java:123)
         at org.eclipse.ui.internal.PerspectiveBarContributionItem$1.widgetSelected(PerspectiveBarContributionItem.java:92)
         at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
         at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
         at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
         at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
         at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
         at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
         at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
         at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
         at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
         at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
         at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
         at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
         at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
         at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
         at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
         at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
         at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
         at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
         at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
         at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
    How to remove this type of error please help me. I need help.plz reply

    What version of Lomboz are you using? J2EE View was available in Lomboz 2.x releases and is not found in later releases. These olde versions used a lightweight JSP editor based on jasper. Your message looks like it is related to that.
    I would recommend upgrading to one of the later releases such as 3.3, which can be found at:
    http://lomboz.objectweb.org/downloads/download.php
    If you have to pursue your current version, you can post your Lomboz releated help messages at and we will try to help you:
    http://forge.objectweb.org/forum/forum.php?forum_id=360

  • Google street view not working on firefox 14.0.1

    google street view not working on firefox 14.0.1 - after moving the person to the map it goes blank. Have tried the fixes in the community support. Still works fine in IE

    Do you have Flash installed? You need a different version of it for Firefox. The plugin for IE will not work with Firefox. You can get it here:
    http://www.adobe.com/products/flashplayer/distribution3.html

  • Customized strings in iPad viewer not working?

    Hello,
    per request of client i've tried to change one string in viewer for iPad. So i've created template in DSP App Builder, modified this template on my computer, choose this file in App Builder and prepared another build (V28). Unfortunately, i still see old original string (i've double tested that i'm downloading new version of app). When i now check DPS App Builder, it just says "Asset stored on server", so i asume, that everything goes smoothly on this side.
    Any similar experience with customized strings?
    Thanks
    Martin

    Everything was done from scratch with V28.
    1. 10. 2013 v 16:14, Bob Bringhurst <[email protected]>:
    Re: Customized strings in iPad viewer not working?
    created by Bob Bringhurst in Digital Publishing Suite - View the full discussion
    That's odd. It worked for me when I tested it. Perhaps you should try moving the current xml file to a different folder, downloading a new version, copying and pasting, and rebuilding.
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/5728130#5728130
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/5728130#5728130
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/5728130#5728130. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Digital Publishing Suite at Adobe Community
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • HT1476 upgraded my IPOD 5 to iOS 7.0.2 and will not charge battery. when plugged in gives message "This cable or accessory is not certified and may not work reliably with this IPOD".

    Just Upgraded my IPOD 5 to iOS 7.0.2 and it will not charge the battery anymore.
    When I plug it in, it now gives the message "This cable or accessory is not certified and may not work reliably with this IPOD".
    Anyone else have this issue after they upgraded the iOS system?
    Thanks,

    - See:      
    iPod touch: Hardware troubleshooting
    - Try another cable. Some 5G iPods were shipped with Lightning cable that were either initially defective or failed after short use.
    - Try another charging source
    - Inspect the dock connector on the iPod for bent or missing contacts, foreign material, corroded contacts, broken, missing or cracked plastic.
    - Make an appointment at the Genius Bar of an Apple store.
      Apple Retail Store - Genius Bar 

  • MATERIALIZED view on two tables with Fast Refresh

    i Wanted to create MV on two tables with Fast refresh on commit.
    I followed below steps
    create materialized view log on t1 WITH PRIMARY KEY, rowid;
    create materialized view log on t2 WITH PRIMARY KEY, rowid;
    CREATE MATERIALIZED VIEW ETL_ENTITY_DIVISION_ASSO_MV
    REFRESH fast ON commit
    ENABLE QUERY REWRITE
    AS
    select A.ROWID B.ROWID,a.c1, DECODE(a.c1,'aaa','xxx','aaa') c2
    from t1 A
    join t2 b
    on AB.c1= CD.c2;
    i am getting below error.
    Error report:
    SQL Error: ORA-12054: cannot set the ON COMMIT refresh attribute for the materialized view
    12054. 00000 - "cannot set the ON COMMIT refresh attribute for the materialized view"
    *Cause:    The materialized view did not satisfy conditions for refresh at
    commit time.
    *Action:   Specify only valid options.
    Basically i want to take record in MV by joinig two tables and if both of the base tables will updated then record should reflect in materialised view.
    Please do the needfull.

    does the table support PCT? the other restrictions on joins look to be ok in your statement.
    maybe try creating first with on demand instead of commit to see does it create.
    http://docs.oracle.com/cd/B19306_01/server.102/b14223/basicmv.htm
    >
    Materialized Views Containing Only Joins
    Some materialized views contain only joins and no aggregates, such as in Example 8-4, where a materialized view is created that joins the sales table to the times and customers tables. The advantage of creating this type of materialized view is that expensive joins will be precalculated.
    Fast refresh for a materialized view containing only joins is possible after any type of DML to the base tables (direct-path or conventional INSERT, UPDATE, or DELETE).
    A materialized view containing only joins can be defined to be refreshed ON COMMIT or ON DEMAND. If it is ON COMMIT, the refresh is performed at commit time of the transaction that does DML on the materialized view's detail table.
    If you specify REFRESH FAST, Oracle performs further verification of the query definition to ensure that fast refresh can be performed if any of the detail tables change. These additional checks are:
    A materialized view log must be present for each detail table unless the table supports PCT. Also, when a materialized view log is required, the ROWID column must be present in each materialized view log.
    The rowids of all the detail tables must appear in the SELECT list of the materialized view query definition.
    If some of these restrictions are not met, you can create the materialized view as REFRESH FORCE to take advantage of fast refresh when it is possible. If one of the tables did not meet all of the criteria, but the other tables did, the materialized view would still be fast refreshable with respect to the other tables for which all the criteria are met.

  • New FocusTraversalPolicy Mechanism Does Not Work Well With OO Designs

    I would like to complain about the new focus traversal mechanism not working well with object-oriented GUI designs.
    Specifically, we have many reusable panel classes that can be swapped in and out of reusable dialog classes. On some of these panels, the default focus traversal is not what is desirable, perhaps because one component on the right side of the window is just slightly higher than a component on the left side, maybe due to the component on the right having a label on top, and so the default focus goes to the component on the right instead of the left. So we have a need to be able to explicitly define the order of components in some panels.
    If I try to define a focus traversal policy in the panel's constructor, a NullPointerException is thrown because the panel's focus cycle root is null (the panel has not been added to any dialog or frame yet).
    If I try to associate a focus traversal policy at the dialog level, it would have to explicitly reference its child panels' inner components, which would break the encapsulation of the panels. It would also make it hard to have generic dialog classes into which various reusable panel objects can be swapped.
    Someone suggested making each panel a focus cycle root. This makes it hard to "break out" of one panel to move on to the next panel in the dialog. Special keys would have to be assigned to try to cycle out, and these keys would have to be different than the normal traversal keys, making them inconsistent and nonintuitive to the user. Also, the focus policy would have to know if the dialog had more than one panel, what order the panels were in to know whether to cycle to the next panel or not, etc. This is a mess.
    Does anyone have any idea how to get around these problems? I have tried using a global focus policy with a global hash map of prev/next component key-value pairs, but we are still running into trouble with some deeply nested tabbed dialogs. It's just not possible to always have the focus cycle root in existence at the point where you want to explicitly define traversal between two components, or when you are trying to establish the default component for a panel in a tabbed pane.
    Has anyone else run into similar issues?
    Robbie Gilbert
    [email protected]

    I agree completely. One of the popular consultants on this forum stated that the new focus mechanism was more versatile and only a little more complex. I would say it's more than a little complex given the trouble average programmers are having understanding how it works...at least at first...and after understanding it realizing that they are going to have type their fingers off to update their code. Oh, and the dread of maintaining this awful mess.
    I'm currently having the same problem as you Robbie. Some of my reusable panels need special tab ordering...that's not usually a problem, in most programming environments, till now. Now I have to go around the world and back just to get my stupid cursor to be in the right place when I hit the tab key??!!! and special key mappings just to get out of a focus cycle...lame.
    And how is an IDE graphical designer going to work with this? It's not, that's how...ok maybe if some kind person or company creates a custom focus traversal policy editor of some kind, I don't know.
    Good grief Sun! We need something to help us meet our deadlines, not solutions that force us to spend 80% of our time customizing every stinking bit of UI functionality we need!!!
    JTables are even worse. I've mastered most of the garbage that is JTable after many months of pain and I don't know how I'm going to help my peers understand them in any short amount of time. Most of them were Oracle Forms programmers, not that that is any great solution either. But they will likely have problems.
    In conclusion, I wish I had chosen another UI technology for our new product client, and may yet.

  • ICloud Synchronization not working between iPad first gen 5.1.1 & iPhone 4S 6.0.1?

    iCloud Synchronization not working between iPad first gen 5.1.1 & iPhone 4S 6.0.1?

    I can see the acknowledgement that this issue will be fixed in the 'next' software update. Considering the original post was for an iPad 2 running 5.0.1, I am not sure if this issue on iOS 5.1 which runs on my new iPad (4G) is considered fixed. As I reported in my previous post it is impossible to update individual tracks. I also tried adding entire collection to a single playlist, shuffling the playlist. While shuffle is in progress, turning to the 'list' view that allows tracks to be rated does who the currently shuffled playlist and the currently playing track and assigns the rating to the track correctly. However, as soon as the second track plays, switching to list view (which displays the ratings) lists only the tracks from the currently playing track's album. Which is insane IMHO.
    So, was this not fixed with 5.1 update? Or the iOS 5.1 will get it's own piece of update on this?

  • Remote not working properly with Apple TV...sporadic fuctioning

    Hello,
    I have no idea what caused this to happen, but both my remotes (I have one from my MacBook Pro and one from my AppleTV) seem to not work properly with AppleTV. It sometimes works but it is extremely frustrating as it only registers about 1 out of every 10-20 clicks then continues to remember the previous clicks therefore making it essentially impossible to select the desired menu/item. Basically it just seems like it's out of control!
    I tested whether it was the remote or AppleTV that was causing the problem by running Front Row on my MacBook Pro and both remotes seem to navigate Front Row perfectly fine. They both act the same way with AppleTV, whether they are paired or not. It seems as though something happened with my AppleTV. This problem occurred randomly, with no specific cause I can think of.
    Please let me know if any of you have ever experienced this problem and what your solution was, if any!
    I have tried restoring to factory conditions, resetting settings, ran diagnostics, unplugged and replugged it, and nothing seems to be working!
    Oh, and I just replaced the battery on one and have tried swapping batteries, etc.
    HELP PLEASE!
    Thank you,
    Travis

    The menus have never been as responsive as they used to since the 2.0 update in my opinion - basically AppleTV seems to cache/buffer remote click if it is busy or perhaps waiting for something to stream from itunes, and when resources become available it suddenly executes all command rapidly which makes it behave wildly in menus.
    Usually happens I find after restarting the unit or if streaming drives have gone in to power saving modes and there's a delay while they wake up to feed the AppleTV.

  • HP computer will not work properly with an HP printer

    I have the following two items that I am trying to use together:
     - HP 23" TouchSmart Desktop, T6500 2.1GHz 4GB DDR3, 500GB HDD (Windows 7)
     - HP OfficeJet 6500 Multi-Function Printer/Scanner/Fax
    When I try to scan to Adobe Acrobat Professional 9.0, the document goes through the scanner, however the dialog box that I would expect (e.g. "Next Page" or "Done") never shows up.  At this point, the system is unresponsive with respect to Adobe or the printer.
    I suspect that it is waiting for the input from the dialog box that never showed up.  I tried to move the other windows to see if the dialog opened in the background, however I am not able to select any of them (they remain frozen).
    I contacted HP Support, only to have them tell me it must be the driver, and I have an "old" printer.  (I did not realize that a 9 month old printer was considered "old").  I have tried all of the possible drivers that are available (original disk, downloads, other downloads from HP tech support), none of these resolves the problem.
    In any case, they were unable to resolve the problem of having an HP computer work properly with an HP printer.  (The printing function seems to work, just very slowly).
    Has anyone else heard of this?  Is there a resolution?

    Update: I am still looking for a solution to this problem - the scanning portion of the Multi-function OfficeJet 6500 does not work properly with the HP TouchSmart computer.
    I have not been able to find anyone in HP that can tell me when (or if) new drivers will be released for this printer.
    I decided to investigate upgrading to a newer version of printer since HP told me the 9 month old printer I have was "obsolete", only to find that the identical printer is still on sale in many stores.  Hmmm....
    I feel like I am getting the run-around from HP.
    I have since tried several more driver/software combinations, but every time I have the same problem (as described in the previous post).
    If anyone has any ideas or suggestions, I would be most happy to hear them.
    Thank you.

Maybe you are looking for