Listagg works does not in mview with fast refresh on commit?

Version Info:

Oracle Database 11 g Release 11.2.0.3.0 - 64 bit Production

PL/SQL Release 11.2.0.3.0 - Production

CORE Production 11.2.0.3.0

AMT for 64-bit Windows: Version 11.2.0.3.0 - Production

NLSRTL Version 11.2.0.3.0 - Production

I have a materialized view that is defined as fast refresh on validation and includes a call to listagg. The update goes as planned, but the value of the column that is created by using the listagg not updated unless I have make an explicit refresh. I was able to recreate the problem with a simple case, pasted below. Someone knows how to fix this?

Thank you!

-Tom

Test scenario follows...

SQL> create table codes (
  2       id number primary key,
  3       product varchar2(10) not null,
  4       code varchar2(10) not null);

Table created.

SQL> create materialized view log on codes with rowid, sequence (product, code) including new values;

Materialized view log created.

SQL> create materialized view code_agg_mv
  2        refresh fast on commit
  3        with rowid
  4        as
  5  select c.product
  6        , listagg(c.code, ',') within group (order by c.code) codes
  7        , count(*) cnt
  8    from codes c
  9   group by c.product;

Materialized view created.

SQL> truncate table mv_capabilities_table;

Table truncated.

SQL> begin
  2       dbms_mview.explain_mview('CODE_AGG_MV');
  3       commit;
  4  end;
  5  /

PL/SQL procedure successfully completed.

SQL> select capability_name, possible
  2    from mv_capabilities_table
  3   where capability_name like '%REFRESH%'
  4   order by capability_name;

CAPABILITY_NAME                P
------------------------------ -
REFRESH_COMPLETE               Y
REFRESH_FAST                   Y
REFRESH_FAST_AFTER_ANY_DML     Y
REFRESH_FAST_AFTER_INSERT      Y
REFRESH_FAST_AFTER_ONETAB_DML  Y
REFRESH_FAST_PCT               N

6 rows selected.

SQL> insert into codes (id, product, code) values (1, 'Pants', 'Large');

1 row created.

SQL> insert into codes (id, product, code) values (2, 'Pants', 'Blue');

1 row created.

SQL> insert into codes (id, product, code) values (3, 'Pants', 'Itchy');

1 row created.

SQL> commit;

Commit complete.

SQL> select *
  2    from code_agg_mv;

PRODUCT    CODES                                 CNT
---------- ------------------------------ ----------
Pants      Blue,Itchy,Large                        3

SQL> -- ^^^ This is correct ^^^

SQL> delete from codes where id = 3;

1 row deleted.

SQL> commit;

Commit complete.

SQL> select * from code_agg_mv;

PRODUCT    CODES                                 CNT
---------- ------------------------------ ----------
Pants      Blue,Itchy,Large                        2

SQL> -- ^^^ CNT is correct, but codes should not contain "Itchy" ^^^
SQL> --
SQL> -- Try an explicit fast refresh...

SQL> begin
  2       dbms_mview.refresh('CODE_AGG_MV', 'F');
  3  end;
  4  /

PL/SQL procedure successfully completed.

SQL> select * from code_agg_mv;

PRODUCT    CODES                                 CNT
---------- ------------------------------ ----------
Pants      Blue,Itchy,Large                        2

SQL> -- ^^^ Nope, same issue. ^^^
SQL> --
SQL> -- Try an explicit complete refresh...

SQL> begin
  2       dbms_mview.refresh('CODE_AGG_MV', 'C');
  3  end;
  4  /

PL/SQL procedure successfully completed.

SQL> select * from code_agg_mv;

PRODUCT    CODES                                 CNT
---------- ------------------------------ ----------
Pants      Blue,Large                              2

SQL> -- ^^^ There we go. ^^^

Message edited by Tom N to include database version information.

Hello Tom,

listagg() is not supported for fast refresh.

http://docs.Oracle.com/CD/E11882_01/server.112/e25554/basicmv.htm#i1007028

Only SUM, COUNT, AVG, STDDEV, VARIANCE, MIN and MAX are supported to fast refresh.

Kind regards

Pravin

Tags: Database

Similar Questions

  • Facebook, Gmail and MétéoMédia works does not for me with the last update, even in safe mode

    That pretty much sums up it. Since yesterday, with the most recent update, firefox does not display correctly these sites. Someone else posted a question similar to this topic. It has been marked as resolved, but there is no solution posted. Here's his question: https://support.mozilla.org/en-US/questions/963125 I have the same problem as him with fb. In addition to the problem with fb, Gmail doesn't end loading. And MétéoMédia do not display the weather forecast. I'm sure that many other sites are affected as well.

    All sites work properly in Seamonkey, which I use once again, now. I went to oldapps download v. 22 of ff, but whatever the most recent update changed only came when I installed v.22. The problem persists. I could uninstall it completely and then new installation v.22, I guess, but I'm afraid that my browsing history, sessions, passwords, etc., would be affected, and I don't want to find all the files and support first. It's a hassle. Since the sites work in Seamonkey, I'm guessing that's not the fact that I have updated flash at the same time. I don't know how much these sites use flash, either. But if it's a problem of flash, I tell myself I should have the same problem in Seamonkey, and I did not.

    I wish that you guys would have an easy option to restore your updates because it's pretty darn annoying when they cause problems. Usually, they are not lethal problems, however, and the browser still works. Now ff does not work for some sites I use most often.

    Hello

    Many issues of the site can be caused by corrupted cookies or cache. To try to solve these problems, the first step is to clear cookies and cache.
    Note: This will be you temporarily disconnect all sites, you're connected to.
    To clear the cache and cookies to do the following:

    1. Go to Firefox > history > clear recent history or (if no Firefox button is displayed) go to tools > clear recent history.
    2. Under "Time range to clear", select "all".
    3. Now, click the arrow next to details to toggle the active details list.
    4. In the list of details, see the Cache and Cookies and uncheck everything.
    5. Now click the clear now button.

    More information can be found in article to clear your cache, history, and other personal information in Firefox .

    __________________________________________________________________

    Also, some Firefox problems can be solved by performing a clean reinstall. This means that you remove Firefox program files, and then reinstall Firefox. Please follow these steps:

    Note: You can print these steps or consult them in another browser.

    1. Download the latest version of Firefox from http://www.mozilla.org office and save the installer to your computer.
    2. Once the download is complete, close all Firefox Windows (click on quit in the file menu or Firefox).
    3. Remove the Firefox installation folder, which is located in one of these locations, by default:
      • Windows:

        • C:\Program Files\Mozilla Firefox
        • C:\Program Files (x 86) \Mozilla Firefox
      • Mac: Delete Firefox in the Applications folder.
      • Linux: If you have installed Firefox with the distribution-based package manager, you must use the same way to uninstall: see Install Firefox on Linux. If you have downloaded and installed the binary package from the Firefox download page, simply remove the folder firefox in your home directory.
    4. Now, go ahead and reinstall Firefox:
      1. Double-click on the downloaded Setup file and go through the steps in the installation wizard.
      2. Once the wizard is completed, click to open Firefox directly after clicking the Finish button.

    This will remove not essential info unless you check the box "delete all my personal data too.

    Please report back to see if this helped you!

    Thank you.

  • Poster works does not as expected with Adobe CS5

    I've finally updated to OS X on an early 2009 Mac Pro Quad Core. I have two screens: a 20 "Apple Cinema and a Samsung Syncmaster. Previously, always with Snow Leopard, I had no problem with the implementation of my menus, panels, etc on the Samsung, thus leaving my film clean and only to view the picture or painting under development. It's a great ploy.

    But now, I can't have my workspace (menus, panels and so on) to "stick" to the Samsung. Instead, they insist on layering anything I'm working on the cinema, which is now difficult to see behind all the clutter menus and panels.

    I tried to move this to the Samsung, and I saved the arrangement as a new workspace. But the next time and so on, I opened Photoshop, all the menus were back on my film. It is a problem, I expected little, all the problems you may have. But it is serious because I'm not keen on having to pass all the other screen before starting work. In addition, it could be the cause? None of the existing workspaces or those custom made displays on the second monitor except if moved manually.

    I'd appreciate responses as to why this is happening. Thank you

    -Try to reset memory NVRAM/PRAM and SMC

    MacIntel: Reset of the controller (SMC) system management

  • with firefox 43 yahoo and yahoo mail doesn't work does not correctly

    With the help of win 7 and firefox 43.0.1, I have 4 computers and now all have problems with yahoo and yahoo mail doesn't work does not correctly. Loading sites, but most of the features are missing and clicking on what whether changes to the lists of text. I have disabled flash / anti-spam etc., cleared cookies and cache and even firefox loaded down once again and have upgraded, no help. I'm forced to use IE now.

    I tried Yahoo support, they said try Firefox... In any case, it's Firefox and I found a solution using the 'Refresh Firefox' button. Whatever the problem was fixed on two of my computers so far. Got to update my setting again but it's 10 m, compared to the 10 hours I spent trying all that is nothing.

    Thanks for the help!

  • Active state with menu manual not working does not with child pages

    I created a horizontal menu manual on my master page with two links (at WORK and about me). I did them manually as it was the only way I could work out how the style and the menu items to distance as I wanted. I created an active state that works for the main page WORK and the about me page.

    However, I have four child pages under the work, but when you click on one of them that the active State for labor (a green line under work) does not appear. When I return to the menu options to try to "solve" the problem and choose "All pages" all child pages appear in the main menu I want and does not solve the problem. I chose manual that I could put the line to show that under the term of WORK and not all field.

    Here is my Web site to demonstrate the problem: www.robertgreens.com

    Any help to fix this would be appreciated with gratitude!

    I managed to solve this problem (with the help of Live Chat Support). I needed to create an autour work and provide a 'normal' State which resembled the active state, so when you click on the pages of the child, it looked like work page parent menu (with a green line) below. This meant that I had to duplicate master page and do the same (deletion of the green line in the menu of work) for the words Me page. And now, everything looks the same: www.robertgreens.com

  • I had endless problems with Lightroom since the purchase of subscription for one year in December 2014. Now, the development Module was disabled, as they claim that my subscription has expired...  He spent more time to work does not, and I'm bitterly briv

    I had endless problems with Lightroom since the purchase of subscription for one year in December 2014. Now, the development Module was disabled, as they claim that my subscription has expired...  He spent more time to work does not, and I bitterly regret it.  Help, please!

    Open the Adobe Creative Cloud application then go to preferences then sign out and then sign back with the same Adobe ID that you used to purchase the subscription photographers, that is to say the same e-mail address and password.

    Then open Lightroom and go to the Help menu and make sure that it is signed in with that Adobe ID email address.

  • computer HP laptop, 2000 does not recognize tv with a hdmi cable

    my computer hp laptop 2000 does not recognize tv with an hdmi cable.  I get the error "does not recognize any other monitor" when I try to "detect".

    I have recently upgraded to windows 8.1

    I have the graphics card AMD Radeon HD 6310

    The TV is a Phillips HD TV hotel.

    My game system works using VGA cable

    Any help would be greatly appreciated.

    Hi Ringerbell,

    Thank you for visiting the Forums HP's Support and welcome. I read your thread on your laptop HP 2000 and connect an external TV tuner. Here is a link to connection and external display. Here is a document onthe configuration ofyour laptop to use the monitor.

    Hope this helps you.

    Thank you.

  • WIFI doesn't work does not correctly after driver update

    I have a DESIRE 4 laptop 1023tu with operating system Windows 8 PRO. My WIFI works does not properly after the update drievr.

    Problems...

    1. When you try to connect to a wifi hotspot the quick adapter turns off and allows the card instantly

    2. after connected, sometimes no internet access and the problem turns off only after reconnecting to the netwrok after setting off.

    If the update doesn't work not for you then do as I explained in my previous post and roll back to the previous driver. This philosophy can be applied to all updates.

    If there is no pressure or emerging reason to update to your PC or laptop works just great... do not update. (this is especially true when it comes to an update of the BIOS)

    For your question #2, the problem could be your wireless (modem, router or access point) which causes the connection dropped.

    Best regards
    ERICO

  • Windows Vista does not start upward, with success since the closure complete

    Hello world

    I actually had this problem for a long time, but I'm just now to a point where I'm ready to take a lead in fixing it.

    I can't identify when it started, but Windows Vista does not start upward, with success of a full stop. He gets to the screen where, in general, the green bars will travel across the screen, but the green bars will not come. The screen looks dim and sits there, with the text of the copyright of Microsoft Corporation. So, after not having on the mound, I have to manually shut down the computer by holding down the power button. When I try to start again, told me to go through the Startup Repair tool. If I jump the repair, I just have to meet the same problem - a computer that will not go beyond the screen "green bar".

    So, I do the Startup Repair, and told me what I do for the restoration of the system. Windows starts normally after the restoration.

    Don't forget, this happens from a full stop. To remedy this, I just never completely shut down my computer. I left running and back just at the beginning of the day. The computer may start restart, it just may not start with a full stop.

    Given the start of repair takes, literally, around 4 or 5 hours of full stops complete, accidental or power outages are a nightmare, I am obliged to wait 5 hours to get access to the computer. Fortunately, I have my laptop.

    If someone has encountered this? I saw people talking about the loop of startup repair, but that's not the point, I have. I have yet to see any discussion of my specific problem.

    Thanks in advance!

    Hello

    4-5 hours to do a startup repair is too long.

    Often you get better results if you a using a DVD of Microsoft Vista startup repair.

    Jose how to do a startup repair, etc. using a DVD of Vista from Microsoft

    Manufacturers recovery disks normally do not have Service Options; they are normally a relocation to the factory only settings option.

    Here is the guide to repair Options using a Vista DVD from Microsoft.

    If a friend or a work acquantance of yours has one, you can borrow and use it for repairs.

    http://www.bleepingcomputer.com/tutorials/repair-Windows-with-Windows-Startup-Repair/

    Table of contents

    1. Overview of Windows Vista repair options
    2. How to perform an automatic repair of Windows Vista using Startup Repair
    3. Advanced Tools Overview
    4. Conclusion

    If you do not or can not borrow a Microsoft DVD there is a download of a file ISO of Vista Startup Repair available that you can put on a Bootable floppy to make the above startup repair and that the method is recommended by a large number of posters in these Forums.

    Unfortunately, you have to buy it.

    Here is a link to it:

    http://NeoSmart.net/blog/2011/Windows-Recovery-discs-updated-reinstated/

    See you soon.

  • my microsoft work does not work error message that I need to reinstall, but I don't have a disck because it was already installed when I bought at walmart

    I bought my dell computer 2009 Wal-Mart, that he has is already set up with windows vista basic... and now my microsoft works does not work it says I have to reinstall.  However, he is not come with a disc. so, how can I do without having to buy a disc

    Go here: https://smartsource.dell.com

    This is where you go to download programs that have been installed on your computer that you do not have a CD for.

  • To run all the applications of the laptop or install download applications works does not error message indicating that the application is not valid "win32.exe or win32.application.

    To run all the applications of the laptop or install download applications works does not error message indicating that the application is not valid "win32.exe or win32.application.

    Hello m.velentino,

    Not sure if you are still having the error message isn't valid win32.applicaiton.

    Get the error: not a valid 32-bit application can have several origins:
    I have listed some of them below.

    The file is corrupted, bad or missing.
    -If the hard disk is damaged or hurt it cause work programs to fail, either because not all data can be read from the hard drive the program is damaged on the drive. Run scandisk and defrag on the hard disk to check for potential errors.
    -If you run the program from a shortcut on the computer, verify that the program is still on the computer. In some cases if the program is no longer installed on the computer, you can get this error.

    File is not designed for your version of Windows:
    -If you try to run a program that is not designed for your version of Windows, you can get this error.
    -Although many old programs designed to work in older versions of Windows will work with new versions of Windows, unfortunately, not all programs will not work.
    -If the program is an MS-DOS program more former start program or Windows, you can get this error.
    -If the program is designed for a 64-bit version of Windows and you are running in a 32-bit version of Windows, it will not work and generate this error.

    File is a virus, worm or other malicious program file.
    -
    This error can be generated by a file that is a virus, worm, Trojan horse or other type of malware file. Often, this will result because the antivirus installed on the computer will not allow the file to install or run. Try to analyze the file to check, it is not a virus or infected.
    -If the file has been checked and is clean, it is always possible that the virus protection program or a another program installed on the computer is at the origin of questions during installation or execution of the program. Start the computer in Mode safe and try to run the program. start the computer in Mode safe will be that nothing is running in the background that could cause this problem.

    Hardware incompatibility.

    -If you get this error during the installation of a program, it is also possible that the CD-ROM drive or the drive that you are installing the program from is not compatible with Windows or has drivers that are not compatible with Windows.
    -Download the latest drivers for your CD player or other of the manufacturer of the computer or the manufacturer of the equipment. (Microsoft does not pilot for other materials)

    Let us know if these suggestions help you.

    Marilyn

  • Why lately company does not release smartphones with screens 4 inches?

    Good evening!

    Why lately company does not release smartphones with screens 4 inches? Me as a person with small hands, it is very difficult to work with models even 4.3 inches.

    Now, I have Sony Xperia P. Very comfortable: fit to display me size metal case. Everything is fine except for the inserts in plastic (lower part). Shabby paint with these pads. Now, the phone looks not very nice. So I thought to change towards a new model. Because the phone close to 3 years.

    Expected to soon release a smartphone with a diagonal of 4 inches? (And in a metal box).
    Thanks in advance for your answer.

    Hi Valeria! You can share your suggestions on the Sony Mobile community here. Thank you!

    If my post answered your question, please mark it as "accept as a Solution.

  • What are the causes of media error does not exist, even with the inserted disc

    I have a video project of 2 h I want to put on a DVD in NTSC format.  I get a msg of error 'Media does not exist', even with the DVD inserted in the drive.  I checked "Fit content to the space available.  Is the hr project 2 too long to compress the DVD, or are there other possible causes?  I have made a project of 1 1/2 hours without any problem.  I have a lot of hard disk space.

    Download orders

    What version of Premiere Elements and on what operating system works - it?

    The problem is the disc in the tray of the burner not recognised by Premiere Elements. Another frequent related issue is location of burner: burn dialog is empty when the Premiere Elements does not recognize the burner.

    In the problem that you have.

    have a. you tried other brands/types of DVD discs?

    b. If you start a new project and take the new timeline content DVD-video to DVD disc, the problem remains the same?

    B. have you tried to uninstall / free program ccleaner cross / reinstall with antivirus and firewall disabled?

    If you are in a time crunch, you should consider burning the chronology contained in the record and then taking the the VIDEO_TS folder

    recorded in a program like ImgBurn for DVD-VIDEO on DVD production.

    Please check and review and then provide you with the way to details. Looking forward to your results.

    Thank you.

    RTA

  • Adobe flash player not working does not or does not appear as an application under Tools, options

    Adobe flash player not working does not or does not appear as an application under Tools, options

    If you can't Flash 11.3 to work and need to return to 11.2 Flash you can download Player Flash 11.2 through this direct link:

  • AutoComplete doesn't work does not after installing IE *.

    AutoComplete URL function works does not after installing IE8.  Looking at the Advanced tab properties IE I see an option to use AutoComplete (which is
    ticked off) but it is said to "..". turn of Internet Explorer".  Whatever that means, and how I seized not semi-automatic work again under IE8?  I can go back
    for IE7, if it's the only way.   I tried to hit "reset" on the Advanced tab I saw a thread on try this - but no go...  Thank you

    sjakulski,
    Thank you for visiting the Microsoft Answers community forum.

    In Internet Explorer 8, the Auto complete option is in a new tab.  Go to tools, Internet Options and then click the content tab.  You will see a section that says "Auto-Complete".  Click on the 'Settings' button and it gives you several choices of auto complete options.

    This should solve your problem.  Let us know if you need more information.
    Thank you, Gloria
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

Maybe you are looking for

  • Development Web - page bookmarks don't work

    I'm developing a Web site. I have bookmarks that work in IE and Chrome, but not Firefox. I use a tool called AsxSplitter by DevExpress page separator. Is it possible to make Firefox work with this tool?

  • for Compaq 6000 of Wake on lan

    Hello Just bought a HP Compaq 6000 Pro SFF PC second hand My problem is simple, Power On LAN works if the machine is in "standby", but not if turned off. Yes the network LED turns on, but the motherboard is still as built, so the BIOS needs updating.

  • fingerprint (Biometric)

    4540 proBook s Win 7 Pro 64-bit fingerprint reader not working do not, I downloaded the driver from hp sebsite, I tried all the stuff I could find. in Device Manager it is there still anything else: no software, not invited to use as a security optio

  • Ethernet network Officejet Pro L7555 printer-perfect on one but feel problems with others

    My HP Officejet Pro L7555 is connected to an ethernet network.  Two computers are on the network in the same residential group.  The printer is installed on computer A (I-5 with Win 7 Pro) files downtloaded the HP support assistance.  It is shared wi

  • 6700 duplex printing problem

    I've just set up the hp officejet 6700 premuim for windows 7. For several days, it was two-sided printing. Today, the drop down menu no longer has optionally double-sided printing. I checked my setup and automatic duplex printing unit shows installed