ORA-01776: I can not insert a view consisting of two tables

Hello:

I'm doing an insert on a view composed by the join of two tables (services and employees) and it failed.

The view is the following:

CREATE OR REPLACE FORCE VIEW 'EMPDPTO' ('EMPLOYE_ID', 'LAST_NAME', 'EMAIL', 'HIRE_DATE', 'JOB_ID""DEPARTMENT_ID","DEPARTMENT_NAME") AS
(
SELECT employe_id, last_name, email, hire_date, job_id, d.department_id, department_name
E employees, departments d
WHERE e.department_id = d.department_id
);


My insert command

INSERT INTO empdpto
VALUES (743, 'Bermejo', '[email protected]', 12 December 09 ', 'IT_PROG', 10, 'Administration');

get an ORA-01776: it is not possible to modify more than one table of base through a union to join.


On the other side, I saw in the documentation which, in certain circumstances, can do an insert on a complex view.

Is it possible to do an insert on a view consisting of two tables? Under what conditions?

Thank you

Reference of SQL CREATE VIEW http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_8004.htm#i2065510 views editable Notes section

>
If you want a view of join to be updated, then all of the following conditions must be met:

*

The DML must assign only one underlying table of the join.
*

An insert, the view does not create WITH CHECK OPTION, and all columns in which the values are inserted must come from a key preserved table. A key-preserved table is one for which each primary key or unique key in the base table value is also unique in the view of the join.
*

For an UPDATE statement, the view does not create WITH CHECK OPTION, and all updated columns must be extracted from a preserved key table.

>

The first condition is not true for the view that you created.

Edited by: P. Forstmann on 26 Jan. 2010 20:17

Tags: Database

Similar Questions

  • I'm working on an evaluation version (NL). There are no categories in my insert Panel. So I can not insert a PA element or a named anchor point or... etc. I have download the wrong version?

    I train on a trial version 2015 (NL). There are no categories in my insert Panel. So I can not insert a PA element or a named anchor point or... etc. I have download the wrong version?

    It has changed a lot since CS6 DW is released in 2012.  Often people read the tutorials that have been written for this version and do not understand that it is more relevant for DW CC.  Below of the links that describe in detail the changes in each version.

    List of deprecated features:

    http://helpx.Adobe.com/Dreamweaver/using/the-new-modernized-Dreamweaver-cc.html

    New features in CS6 12.2

    2013.html http://helpx.adobe.com/Dreamweaver/using/Whats-New-Dreamweaver-Creative-Cloud-Release-Feb-

    New features in CC 13.0

    http://helpx.Adobe.com/Dreamweaver/using/whats-new-Dreamweaver-CC-2013.html

    New features in CC 13.1

    http://helpx.Adobe.com/Dreamweaver/using/whats-new-Dreamweaver-131.html

    New features in CC 13.2

    http://helpx.Adobe.com/Dreamweaver/using/whats-new-Dreamweaver-13-2.html

    New features of CC June 2014

    http://helpx.Adobe.com/Dreamweaver/using/whats-new-2014.html

    What's new in October 20141 CC & February releases

    https://helpx.Adobe.com/Dreamweaver/using/whats-new-2014-1.html

    New features of CC 2015

    https://helpx.Adobe.com/Dreamweaver/using/whats-new.html

    Nancy O.

  • ORA-14456: can not rebuild the index on a temporary table

    change the IND_DEBITDOCUMENT TABLESPACE INDEXDATA index rebuild
    *
    ERROR on line 1:
    ORA-14456: can not rebuild the index on a temporary table


    why it is given such error?

    Thanks in advance.

    This information is always kept to user_ | all_ | dba_ tables, in this case in the temporary column.

    Obvious, isn't it?

    ---------
    Sybrand Bakker
    Senior Oracle DBA

  • I have some problems with a ONE_TO_MANY relationship, can not insert the record

    I have some problems with a ONE_TO_MANY relationship:

    Imagine the following entities:

    -J' have an operational entity with a relationship to workers one_to_many something like:
    @SecondaryKey(relate = Relationship.ONE_TO_MANY,
        relatedEntity = Worker.class)
        private Set<String> workers;
    -The category of workers is a simple annotated entity.


    Now, I want to do the following and I get the error:

    -Create a bunch of tasks
    -Insert tasks into the entitystore
    -create a set containing all the tasks of primary key
    -involve workers to tasks
    -Insert the task in the database


    The above procedure works fine, but when I try to associate the same set of workers with another task I get an exception like:
    com.sleepycat.je.DatabaseException: (JE 3.3.75) Could not insert secondary key in persist#Sample#sample.Task#workers OperationStatus.KEYEXIST
            at com.sleepycat.je.SecondaryDatabase.insertKey(SecondaryDatabase.java:887)
            at com.sleepycat.je.SecondaryDatabase.updateSecondary(SecondaryDatabase.java:807)
            at com.sleepycat.je.SecondaryTrigger.databaseUpdated(SecondaryTrigger.java:42)
            at com.sleepycat.je.Database.notifyTriggers(Database.java:1735)
            at com.sleepycat.je.Cursor.putInternal(Cursor.java:1368)
            at com.sleepycat.je.Cursor.putNoOverwrite(Cursor.java:498)
            at com.sleepycat.persist.PrimaryIndex.put(PrimaryIndex.java:366)
            at com.sleepycat.persist.PrimaryIndex.put(PrimaryIndex.java:315)
    Can someone please clarify what my problem is and where I should change for this case study work?

    Thank you

    The above procedure works fine, but when I try to associate the same set of workers with another task I get an exception like:

    The table in this javadoc should help. Please think about whether they are 1 of many, many 1 or many is the appropriate link.

    http://www.Oracle.com/technology/documentation/Berkeley-DB/je/Java/COM/Sleepycat/persist/model/SecondaryKey.html#relate)

    -mark

  • MacBook pro mid-2009 can not insert disc in the drive

    I can't insert a floppy in the drive of my Macbook Pro mid-2009! It's a s if there is a disc already inside - something is it prevents insertion of entirely.

    I've tried several "cures" I found on the net - one of them worked for a short period but now the problem is back.

    The guys at the genius bar in an Apple store have seen this problem so often, they got some field tools rush this opening and get in and out drives. If who disobeys, they can take in the back and open it to fold the skin of the player, fitness and clear of the issue.

    You an appointment for an assessment is free, guaranteed, or rear. In general, if they can solve this problem in less than a quarter hour without spending coins, there is no charge.

  • Master detail form can not insert foreign key

    Hello

    I Master detail form, in the data block master, I Header_ID primary key and it is generated through trigger on the main table and this field is found in the data block but is hidden on the Web, this Header_ID is a key in another table, on the form, I created the main form and has also created the good relationship. now, when the new record is inserted, the Header_ID in the main table is filled properly while in the secondary table that goes with the NULL value. I have no idea how to solve this problem, any help will be appreciated

    Rather than use a database trigger, select INSERT before triggering in the basic data block to fill the HEADER_ID.

    In the before INSERT trigger, you'd have a line like:

    select seq.nextval into :MASTER.HEADER_ID from dual;
    

    When you do this in the before INSERT trigger will fill the element in the block MASTER that feeds in turn the question into the DETAILS or blocks.

  • ERROR: could not insert a value zero in the table. &lt; nom_de_colonne &gt;

    Hi all

    I am facing the problem as follows:

    I've had several columns in the table "transaction".
    the table consists of columns

    transaction_id (PK)
    username (FK)
    equipment (FK)

    The form is made up of 3 columns,
    I would like to have username automatically shown as a text that is displayed by mapping to app_user.

    However, the value is treated as a null value when I tried to insert in the transaction of the table.

    the error is as follows:

    ORA-01400: cannot insert NULL into ('ITEMS'. "OPERATION '." ("" USERNAME ")
    Cannot process the TRANSACTION table row.

    I post in this thread
    app_user
    but I'm not able to solve the problem too, please advice.
    It is very urgent for me.

    Thanks in advance.

    Hello

    If you don't want the user to be able to change it and you want according to the value on the current user name, edit the item and:

    1 set the type: display text (State record)

    2 assign the default value: APP_USER

    3. set the default value Type: PL/SQL Expression

    4 - Set the Source: always, replacement of value that exists in session state

    5 set the Source Type: database column

    6. set the value of the Source or the expression to: username

    Andy

  • Audio Jack can not insert

    Hello, I have my MBP 13 inch retina display audio input is not pluggable. a third of jack may be inserted. I tried to insert it complete but failed. The red light is visible inside the hole and my internal speaker does not work. The sound icon has become grey. I went to system preferences > sound > output to select the speaker internal as updated device but regret internal speaker is not listed only digital output. What should I do to fix this?

    There is a small latch that is displayed when the computer thinks that it uses the audio digital, that's why you see the red light and it says 'optical digital output Port '.

    You should take it to an Apple store if you don't feel able to fix it yourself.

    I fixed that with a toothpick before, but Apple will never tell you put something other than a headphone port. Also, if you damage the port you will void any warranty on your device. So if you think you can fix it yourself, you just need to get the small 'flap' back in its place. But if damage you the computer, Apple will not help you. And don't try to blame me.

    Good luck

  • The sight of my computer has been partially reduced to a minimum and can not get the view full screen. All around the page view is black. Help!

    My view of the Office was "restored to the bottom" permnantly and it cannot be changed. What I discovered on the computer remains low and impossible to get an overview

    Hello Noidea,

    1. When you say restored down, do you mean to say that it is minimized in the taskbar?

    2. did you of recent changes on the system?

    Method 1:

    You can try to change the resolution of the screen and check if it helps.

    Change the screen resolution

    Method 2:

    If it is a recent issue and then try to perform a restore of the system to a prior restore point you have been affected by the issue.

    Note: When you perform the system restore to restore the computer to a previous state, programs and updates that you have installed are removed.

    To run the system restore, you can consult the following link:

    How to restore Windows XP to a previous state

  • Dreamweaver server behaviors, can not insert data into the database

    Hi, I tried to use server behaviors to add registration information in my database in my registration page.

    (1) that I created a login page, and it works very well. This means that connections and the connection works fine database so it can match the record in my database.

    (2) but when I tried to download the news in the form of database, it does not work. When I clicked on the service behavior to double check the action "insert data", it always jumps the error message: "When executing inspectserverbehavior in InsertRecord.htm, a javascript error occurred."

    I copied my code below. Except the form code and a little jquery is written by me, most of the code generated by Dreamweaver.

    <? php require_once('Connections/MAMPPRO.php');? >

    <? PHP

    If (! function_exists ("GetSQLValueString")) {}

    function GetSQLValueString ($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")

    {

    If (via PHP_VERSION < 6) {}

    $theValue = get_magic_quotes_gpc()? stripslashes ($TheValue): $theValue;

    }

    $theValue = function_exists ("mysql_real_escape_string")? mysql_real_escape_string ($TheValue): mysql_escape_string ($theValue);

    Switch ($theType) {}

    case 'text ':

    $theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";

    break;

    case "long":

    case "int":

    $theValue = ($theValue! = "")? intval ($TheValue): 'NULL ';

    break;

    case "double":

    $theValue = ($theValue! = "")? doubleVal ($TheValue): 'NULL ';

    break;

    case "date":

    $theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";

    break;

    case "set":

    $theValue = ($theValue! = "")? $theDefinedValue: $theNotDefinedValue;

    break;

    }

    Return $theValue;

    }

    }

    $editFormAction = $_SERVER ['PHP_SELF'];

    If (isset {}

    $editFormAction. = « ? ». htmlentities($_SERVER['QUERY_STRING']);

    }

    If ((isset($_POST["MM_insert"])) & & ($_POST ["MM_insert"] == "Register_Form")) {}

    $insertSQL = sprintf ("INSERT INTO"user identity"(Ui_LastName, Ui_Email, Ui_FirstName, Ui_Password) VALUES (%s, %s, %s %s)", ")

    GetSQLValueString ($_POST ['Register_Firstname'], "text").

    GetSQLValueString ($_POST ['Register_Lastname'], "text").

    GetSQLValueString ($_POST ['Register_Email'], "text").

    GetSQLValueString ($_POST ['Register_Password'], "text"));

    @mysql_select_db ($database_MAMPPRO, $MAMPPRO);

    $Result1 = mysql_query ($insertSQL, $MAMPPRO) or die (mysql_error ());

    $insertGoTo = "LoginSuccessful.php";

    If (isset {}

    $insertGoTo. = (strpos ($insertGoTo, '?'))? « & » : « ? » ;

    $insertGoTo. = $_SERVER ['QUERY_STRING'];

    }

    header (sprintf ("location: %s", $insertGoTo));

    }

    @mysql_select_db ($database_MAMPPRO, $MAMPPRO);

    $query_Recordset1 = "SELECT *"IDENTITY of the user;"

    $Recordset1 = mysql_query ($query_Recordset1, $MAMPPRO) or die (mysql_error ());

    $row_Recordset1 = mysql_fetch_assoc ($Recordset1);

    $totalRows_Recordset1 = mysql_num_rows ($Recordset1);

    ? >

    <! doctype html >

    < html >

    < head >

    < meta charset = "UTF-8" >

    Registeration < title > < / title >

    "< link href="jquery-mobile/jquery.mobile-1.3.0.min.css "rel ="stylesheet"type =" text/css">

    "< script src="jquery-mobile/jquery-1.8.3.min.js "type =" text/javascript"> < / script >

    "< script src="jquery-mobile/jquery.mobile-1.3.0.min.js "type =" text/javascript"> < / script >

    < / head >

    < body >

    < div data-role = 'page' id = "registrationpage" >

    < div data-role = "header" >

    < h1 > welcome!    < / h1 >

    < h1 > register yourself! < / h1 >

    < / div >

    < data-role = 'content' div > < / div >

    < do action = "<?" PHP echo $editFormAction;? ">" method = "POST" id = "Register_Form" name = "Register_Form" >

    < p >

    < label > Email < / label >

    < input name = "Register_Email" type = "email" required id = form register_email = "Register_Form" title = "Register_Email" >

    < label > < br >

    Password < / label >

    < input name = "Register_Password" type = "password" required id = form register_password = "Register_Form" title = "Register_Password" value = "" >

    < /p >

    < p >

    < label > name < / label >

    < input name = "Register_Lastname" type = "text" required id = form register_lastname = "Register_Form" title = "Register_lastname" value = "" >

    < label > < br >

    First name < / label >

    < input name = "Register_Firstname" type = "text" required id = form register_firstname = "Register_Form" title = "Register_Firstname" value = "" >

    < /p >

    < name of entry = "MM_insert" type = 'submit' form 'Register_Form' value = 'Registration' = >

    < input type = "hidden" name = "MM_insert" value = "Register_Form" >

    < / make >

    < a href = "index.php" data-role = "button" > return to connection < /a > "

    < div data-role = "footer" >

    footer < h4 > < / h4 >

    < / div >

    < / div >

    < / body >

    < / html >

    <? PHP

    mysql_free_result ($Recordset1);

    ? >

    Finally I found the problem.

    It seems in my setting, MAIL does not work in live mode DW. But if moved to any explores, it works fine.

    Adobe really needs to improve its management of PHP.

  • Stuck in a subfolder and can not return to view all folders

    Used TB since many years and this is a first. This morning stuck to the sent folder. Can use to go for other folders, but it's a pain! Must show all folders and presentations to the left side but is not. I tried ESC, close and reopen it, rebooted computer and nothing works. Try to right click on the tab close none of these buttons doesn't work. Am sure that there is a simple solution but can't seem to find it. So appreciate the help!

    Fact reviews | Page layout | The folders pane list accounts and restore files?

    Have you tried of looking for and grasping a vertical separator, in case you have narrowed the width of the pane folder to zero?

  • can not insert tray multifunction color HP Laser Jet Pro 200

    I'm working on a double-sided on 8.5 "x 11.0" document. The printer does a fabulous job but I had to insert another stack of documents and when I tried to close the entry door it just stopped in his tracks and hosts about 3 inches. Paper is inserted properly, although it seems to be seated later in the container than the other two I had printed earlier. When I tried to close the door load paper message went away and despite the door being partially open the document continues to print correctly. I am completely baffled. I took the current load of the book several times and then tried to put the drawer, but it stops. I don't want to force it. Even if it's perfectly printing my project, I'm puzzled that it is not an error message. Has anyone else got a happen to them?

    Well, that was fast! Thank you a lot to solve the problem with the ferry to the paper. You were right. I had inadvertently touched this little blue lever and extended the tray without even realizing I had done. Lesson learned.  Thanks again. I hope one day, I'll be able to help some happless users!

  • Can not insert music in emails

    Sound no more inserts in Outlook Express. I have no idea why it stop working.  I already did so that Windows Media Player 11 is my default player.  My browser is Internet Explorer.  My music plays fine on Windows Media Player.

    You are welcome. Any time you play and e-mail with the background being undermined, it will change your settings. You can give to zero just by opening your speaker settings. At least you know where to look now.

  • BlackBerry smartphones can not remove Messenger view icon

    I updated Blackberry Messenger today and now I have an icon showing 1 message on which I can't get rid of my home screen.  I checked everywhere I can think of and all locations are empty.  I tried pulling the battery and restart but the icon is still there.

    I guess that's the messenger icon - is blue with dots just like the menu button.  Any suggestions for a beginner?

    The last official release of OS for the 8520 is 4.6.1.318

    The link below is the download and the specific instructions.

    Make your own backup first, using the Desktop Manager.

    http://www.BlackBerryForums.com/General-8500-series-discussion-Gemini/214971-latest-OS-8520-4-6-1-47...

  • is it possible that I can not insert empty frames in a video layer after changing the fps to 12?

    If I do, all the drawings after the point where I want to insert the frame will be removed. If I leave the rate untouched, everything works fine.

    Hi trickytriet74,

    suggest you to refer to this link:

    http://feedback.Photoshop.com/photoshop_family/topics/_insert_blank_frame_deletes_all_subs equent_frames

Maybe you are looking for

  • The hyper links Web show, but to show on other browsers

    Turns, it was a problem with the police. Wow

  • Re: Satellite Pro A300 - DVD drawer will not open most of the time

    I have a portable Satellite Pro A300-1NH. The DVD drawer opens not most of the time. Sometimes it does, but most of the time it isn't.Sometimes, if I can get a DVD/CD in the drawer for something to burn, burning works.Most of the time the computer do

  • Satellite Pro 4600 - very low picture on the screen

    Guys, I really need help. I picked up on old satellite pro 4600 eBay and have rebuilt the thing - everything works EXCEPT the screen - I get a very small image, even on the start screen. So far I have - changed the cable lcd - no effect. changed the

  • Preferences of Safari does not open

    All of a sudden my search engine is Bing that I does not change him.   I want to go back to Google.     I pull down the Safari menu, choose Preferences, internet screen is ghost that something will open up and then nothing.    MacBook Pro, the latest

  • model number confusion

    IM struggling to find the right model for the search for drivers & support I know the model of my computer is flex 2 15 model 20405 but trying to find the right link his gold like you are looking for someone knows what is the correct solution in driv