Home » SQL & PL/SQL » SQL & PL/SQL » ORA-01779: cannot modify a column which maps to a non key-preserved table (not understand)
ORA-01779: cannot modify a column which maps to a non key-preserved table (not understand) [message #430714] Wed, 11 November 2009 23:09 Go to next message
carillpower
Messages: 48
Registered: April 2009
Location: malaysia
Member

Hi all, here i got adoubt...hopefully someone could help me out here

I create a procedure which hava an update function in it. The update are like this :

    update 
    (select a.FIRST_NAME,a.FIRST_NAME_SRCH,a.LAST_NAME,a.LAST_NAME_SRCH,a.MIDDLE_NAME,a.NAME,a.NAME_AC,a.NAME_INITIALS,a.PARTNER_LAST_NAME,a.PREF_FIRST_NAME,a.SECOND_LAST_NAME, a.emplid
    ,b.scr_first_name v_fname, b.scr_last_name v_lname, b.scr_name v_name, b.scr_middle_name v_mname
    from PS_DEP a, scramble1 b where a.emplid = b.emplid and a.dependent_benef = b.dep_benef)
    set FIRST_NAME = v_fname,
        FIRST_NAME_SRCH = v_fname,
        LAST_NAME = v_lname,
        LAST_NAME_SRCH = v_lname,
        MIDDLE_NAME = v_mname,
        NAME = v_name,
        NAME_AC = v_name,
        NAME_INITIALS =substr(v_lname, 1, 1)||substr(v_fname, 1, 1),
        PARTNER_LAST_NAME = v_lname,
        PREF_FIRST_NAME = initcap(decode(trim(pref_first_name), null, pref_first_name,v_fname)),
        SECOND_LAST_NAME = initcap(decode(trim(second_last_name), null, second_last_name, v_lname));



I've run it and it shows this error

ERROR at line 5:
ORA-01779: cannot modify a column which maps to a non key-preserved table

I didn't understand why this error keep coming out. The column that connect between the 2 table doesn't need to be update but why it still shows this error.

Kindly help me here, with all appreciate...thanks
Re: ORA-01779: cannot modify a column which maps to a non key-preserved table (not understand) [message #430715 is a reply to message #430714] Wed, 11 November 2009 23:15 Go to previous message
BlackSwan
Messages: 25046
Registered: January 2009
Location: SoCal
Senior Member
SEARCH
SEARCH
SEARCH

http://www.orafaq.com/forum/?SQ=4292c67ecf1911529b26a465770b222f&t=search&srch=key-preserved+&btn_submit=Search&field =all&forum_limiter=&search_logic=AND&sort_order=DESC&author=
Previous Topic: Encountered the symbol "end-of-file" when expecting one of the following
Next Topic: Drop table issue
Goto Forum:
  


Current Time: Wed Dec 07 23:55:35 CST 2016

Total time taken to generate the page: 0.05647 seconds