How to make an update of a view online two tables...

When the unique constraint of the second table includes three columns?

I have two tables A and B and I want to update a table column, one using an update of a view online two tables.

Table A:
col1 primary key
col2

Table B:
col1 u1
col2 u2
COL3 u3
COL4
col5

Table col1 primary key, table B has a unique constraint on col1, col2 and col3.

Tables A and B are joined in this way:
select  A.col1, A.col2 as KEY_OLD, B.col5 as KEY_NEW
from    A, B
where (B.col1 = 'literal_1') and (B.col2 = 'literal_2') and (A.col1 = B.col3) and (A.col2 = B.col4)
And now, I want to update this view and set KEY_OLD = KEY_NEW.

Because of the first three conditions in the where clause for each entry in the table A there is just a matching entry in the table B.
So the table should be preserved in the join key.

But during the update
update (select  A.col1, A.col2 as KEY_OLD, B.col5 as KEY_NEW
            from    A, B
            where (B.col1 = 'literal_1') and (B.col2 = 'literal_2') and (A.col1 = B.col3) and (A.col2 = B.col4)
           )
set     KEY_OLD = KEY_NEW;
I get an error ORA-01779.

I did the updates on inline views this way several times in recent weeks and it work very well.
But so far the unique constraint on the table B was just a column ;-)

So what I need is to make it work with the unique constraint on the application of the three-column table B.

Thank you very much in advance for any help.

Hartmut cordially

Preserved key criteria must be met by the join columns, the optimizer does not agree (in fact I never tried in 11g) just a combination of columns, literals and join.

The alternatives you have are subqueries online (which as you point out can do rather worse), the command MERGE or indicator BYPASS_UJVC semi undocumented.

Tags: Database

Similar Questions

  • How to make an update of location to a group of photos at the same time?

    How to make an update of location to a group of photos at the same time?  This used to be a feature in iPhoto.

    I use El Capitan 10.11.6 and Photos 1.5

    If yu have OS X 10.5.1 s you say that you can not - with OS X 10.11.6 Photos 1.5 (a free update in the app store) you select them and info - enter the location and it will apply to all photos

    LN

  • How to make the updates of operating system for the limited user account?

    original title: how to make the updates of operating system for the limited user account?  Limited user account cannot access the Windows Update page, see instead cautioned against MS the most recent must be installed.

    XP Pro SP3 slipstreamed.  New a DBAN nuked HDD installation

    All the OS updates installed from Admin acct before creating the LUA

    AV installed AVAST

    all dot net uninstalled and then reinstalled to resolve a problem installing Quicken

    Updates to auto lit

    Active Windows Firewall

    Three solutions of workaround for Windows XP running as a limited user

    http://blogs.Computerworld.com/16502/three_workarounds_for_running_windows_xp_as_a_limited_user

    Survive a Windows XP Limited user account

    http://techknack.NET/surviving-a-Windows-XP-limited-user-account/

    See the response from Michael Kuntz - re: HAL files

    http://social.technet.Microsoft.com/forums/en-us/itproxpsp/thread/e8612ac4-b881-4FB3-85e7-32004932fb5f

    There is an available for installation of SP3 Cd

    Manually installing SP3 using the Microsoft Download Center or a CD

    If you have problems to receive the service pack from Windows Update, you can download SP3 as a standalone package from the Microsoft Download Center Web site, and then install SP3 manually. The installation package is intended for it professionals and developers, but you can always download and install this file.

    You can also order a CD from Microsoft containing SP3. For more information, go to the Microsoft site.

    To manually install SP3 using the standalone package installation or CD

    1. Do one of the following:

      • If you downloaded SP3 from the Web site, to install it immediately, click Open or run and follow the instructions on the screen. To install the program later, click on save and download the file to install it on your computer. When you are ready to install the service pack, double-click the file.

      • If you install SP3 from the Service Pack 3 CD, insert the disc into your computer with your current version of Windows XP running, and Software Update Installation Wizard should appear automatically. If this wizard does not appear, click Start, double-click my computer, click on your CD or DVD drive and then click AutoPlay.

    2. In Windows XP Service Pack 3 page, click Next.

    3. Follow the instructions that appear on your screen.

    4. Once the installation is complete, click Finish to restart your computer.

    5. If you disabled your antivirus software, turn it back on.

  • How to make an update?

    How to make an update for Microsoft.NET Framework 4Client profile? Help!

    What makes you think you need?  NET framework 4 is the latest for your OS >

  • How to make an update for camera RAW ARW (sony)?

    How to make an update for camera RAW ARW (sony)?

    General answer in this faq:

    FAQ: Photoshop Elements will work with my camera, or why does not open my raw files?

    For more information, please indicate the camera model and your version of elements.

  • How to make "Windows Picture and Fax Viewer" the default viewer?

    "Picasa" to look at someones photos on the web, and now when dbl click on image, Picasa comes back as the image viewer.
    Is possible, with a permanent framework for XP, do "Windows Picture and Fax Viewer" the default viewer? Thanks again for your help. akmbd166 (XPpro, SP-2, 7 - IE, Office2003)

    "Picasa" to look at someones photos on the web, and now when dbl click on image, Picasa comes back as the image viewer.
    Is possible, with a permanent framework for XP, do "Windows Picture and Fax Viewer" the default viewer? Thanks again for your help. akmbd166 (XPpro, SP-2, 7 - IE, Office2003)

    =================================
    The display of images by default XP's Windows Picture and
    Fax Viewer... so all you have to do is to reset the default values:

    See the following link:

    Utility to repair image file associations
    http://WindowsXP.MVPs.org/imgassofix.htm

    more information:

    (307859) how to change or select which program
    starts when you double-click a file in Windows XP
    http://support.Microsoft.com/?kbid=307859

    Try this... open a folder of images and right-click
    your file image... from the menu, select... Open
    With / choose program.

    Make your choice from the list, or click Browse for the
    correct program if it is not in the list.

    If you want the default value... to choose... "Windows".
    Picture and Fax viewer '.

    Once you make your choice... don't forget to check
    the box that says: "always use the selected program."
    to open this type of file. (you will need to do
    for each format, jpg, .tif, .gif... etc.)

    Also... you can click with the right button on an image and choose
    Properties / change button... Choose the program
    you want to use, and then click on... OK / apply / OK.

    Also, in Windows XP, you can go to... My computer.
    Tools / Folder Options / File Types tab...

    Volunteer - MS - MVP - Digital Media Experience J - Notice_This is not tech support_I'm volunteer - Solutions that work for me may not work for you - * proceed at your own risk *.

  • How to make the taskbar (file/Edit/view/window/help) appear again?

    The taskbar at the top of the page no longers (file/Edit/view/window/help) somehow appear in my Acrobat Reader. How can I make the taskbar poster again?

    Hey larryy97560595,

    You can choose "Menu bar > display > show/hide ' or just press the F9 key to retrieve the menu items.

    Kind regards

    Ana Maria

  • How to make an update of the BIOS on Satellite L300-19F

    Hi, here and a Happy New Year.

    I want to help me, how can I update the BIOS of my laptop? any ideas? Thanks again

    Thanks in advance.
    PS: my laptop part number is pslb8e-01200CDU case is useful.

    Post edited by: mike80gr

    Hello!

    You can download the new versions of BIOS on the Toshiba site. Find your model and select BIOS update
    http://EU.computers.Toshiba-Europe.com

    Download the right file and follow these instructions:

    Extract the zip file containing the BIOS upgrade to a temporary folder.
    Ensure that all open files are saved and all applications are closed.
    Run the *.exe extracted to the temporary folder. Follow the instructions on the screen.
    The BIOS update will be done automatically.
    After a few minutes, the computer will restart automatically.

    Good bye

  • How to make an update of the firmware on a Mac?

    Basically, I want to update my new fuse. I have no idea how to update on a Mac. I'm not good with computers might so someone who knows how to guide me through?

    Thanks I have already done some research, but I guess I can try again.

    Edit: I'm not good with computers. I downloaded the firmware, just exactly how can I open the files? and should I just put it in the "rocket", or one of the folders inside the "rocket" thingy?

    Edit2: I thought of it on mine. Duh!  It was pretty easy actually. And it looks great.

  • How to make this update?

    I am unable to run the below update, what could be the problem?

    SQL > update (select b.paramvalue FROM sairepo. STORE_JOB_DETAILS b, sairepo.job_prop a

    WHERE a.jobid = b.jobid and a.PARAMNAME = "PLEVEL".

    and a.jobid in

    (select id from sairepo.job_dictionary where jobid as ' use %')))

    Set a.paramvalue = b.paramvalue;  2 3 4 5

    Set a.paramvalue = b.paramvalue

    *

    ERROR on line 5:

    ORA-00904: "B". "" PARAMVALUE ": invalid identifier

    SQL >

    SQL >

    SQL > update (select b.paramvalue FROM sairepo. STORE_JOB_DETAILS b, sairepo.job_prop a

    WHERE a.jobid = b.jobid and a.PARAMNAME = "PLEVEL".

    2 3-a.jobid in

    (select id from sairepo.job_dictionary where jobid as a 'Use %')

    4 5)

    6 set job_prop.paramvalue = STORE_JOB_DETAILS.paramvalue;

    Set job_prop.paramvalue = STORE_JOB_DETAILS.paramvalue

    *

    ERROR on line 6:

    ORA-00904: "STORE_JOB_DETAILS." "" PARAMVALUE ": invalid identifier

    I am unable to run the below update, what could be the problem?

    The problem is that A and B alias are out of reach in your SET clause, they can only be referenced from within the online opinion.

    Assuming that the join is actually editable (see policies here: http://docs.oracle.com/database/121/ADMIN/views.htm#i1006318), you can use something like this:

    update (
      select a.paramvalue as old_value
           , b.paramvalue as new_value
      from sairepo.store_job_details b
         , sairepo.job_prop a
      where a.jobid = b.jobid
      and a.paramname = 'PLEVEL'
      and a.jobid in (
        select id
        from sairepo.job_dictionary
        where jobid like 'Usage%'
      )
    )
    set old_value = new_value ;
    

    or use a MERGE statement.

  • How to make a text field for view-only / editable based on a user of APEX

    Hello

    I have a form with fields of 10-20 to assume.
    When the user - Admin logs, I want to field1 as editable, but when another user... User1 connects, I want to do this Field1 as display only... how I can do.

    Thank you
    Deepak

    Deepak

    You can remove the "View only" condition on the field and add this piece of javascript in the "foot" of the definition of the page

    
    

    CITY

    Published by: city has 12 August 2009 15:41

  • How to make 1 update for Windows 8.1?

    I just bought an Acer Aspire with Windows 8.1 XC-605. I now want to upgrade to Windows 8.1. Update 1 but cannot find this update. What should do?

    Hi Permand,

    Update1 8.1 win is not an 'upgrade '. It is a regular update, you receive automatically.

    Take a look at your already installed updates. If you find a named "KB2919355", then you already have it on your system!

    concerning

  • AF:table does not display the records to make the updating of the view object iter

    Hi Experts,

    I use JDeveloper 11.1.1.4 and I have a page that shows a view object records one particular reading as an af:table. When I run the page to everything first he shows all the data at all. But there are 2 folders when I run the query that only read the view object. In my page there is a link called "Refresh" which calls the operation "Execute" in the view of my view object iterator. When I click on this link the table shows two records. Why the table shows no files once when the page is rendered?

    Please help me.

    Hi user,

    Yes use component query to display criteria. Please let me know if something specific I need to check when I use the query component. If you have already faced this problem please help me to solve it.

    you are looking to do this,
    http://www.4shared.com/photo/B36OTSl9/check.html

    Published by: Les on November 22, 2011 12:26 AM

  • CS2 is not supported in OSX mountain lion - how to make an update for power pc?

    My CS2 has a white line through the icon and a message says: this power pc Adobe photoshop application is not supported. Is there a download to fix?

    Thank you

    N ° you must purchase a new license.

    Mylenium

  • How to make shape even alignments of element on two different regions

    Hello

    I have two different areas on the same page as the second is below the first. The two regions have some form elements like text field, select list etc. However the alignment of elements on these two regions are not the same. In different regions, it lines up just the input fields based on the maximum length of the label in the region only, so it creates two different vertical alignments by region. How have the same alignment for elements of entry in all regions?

    (I want to download the screenshot of the page but there is no provision in this forum to do).

    Thanks in advance.

    Natarajan

    The basic approach is to set the width of the point labels using a built-in CSS style sheet in the Header HTMLpage:

    
    

    If you want to limit it to the elements in specific regions, then give these regions region static ID (for example, region-1) for use as CSS selectors:

    
    

Maybe you are looking for