Help in MEREGE statement.
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Help in MEREGE statement.

  1. #1
    Join Date
    Aug 2005
    Posts
    2

    Help in MEREGE statement.

    I creat a procedure . when i am going to run my procedure the following error araise, please helpe me . it is very urgent.

    SQL> EXECUTE PROC_INF_VERTICALS_Q
    BEGIN PROC_INF_VERTICALS_Q; END;

    *
    ERROR at line 1:
    ORA-30926: unable to get a stable set of rows in the source tables
    ORA-02063: preceding line from STAGEDB_LINK
    ORA-06512: at "CASEADMIN.PROC_INF_VERTICALS_Q", line 4
    ORA-06512: at line 1



    SQL> ED
    Wrote file afiedt.buf

    1 select * from all_tab_columns
    2* where column_name ='QUA_DAT_CODE'
    SQL> /

    OWNER TABLE_NAME COLUMN_NAME DATA_TYPE
    ------------------------------ ------------------------------ ------------
    CASEADMIN INF_HORIZONTALS_A QUA_DAT_CODE NUMBER
    CASEADMIN INF_VERTICALS_Q QUA_DAT_CODE NUMBER





    CREATE OR REPLACE PROCEDURE "CASEADMIN".PROC_INF_VERTICALS_Q IS
    BEGIN

    MERGE INTO "STAGEADMIN".INF_VERTICALS_Q@stagedb_link T
    USING "CASEADMIN".INF_VERTICALS_Q S
    ON (T.QUA_DAT_CODE = S.QUA_DAT_CODE)
    WHEN MATCHED THEN
    UPDATE SET


    T.TEXT = S.TEXT,
    T.SEQ = S.SEQ,
    T.QUA_SEQ = S.QUA_SEQ

    WHEN NOT MATCHED THEN
    INSERT VALUES (
    S.QUA_DAT_CODE,
    S.TEXT,
    S.SEQ,
    S.QUA_SEQ);

    Commit;
    END;


    Thanks

  2. #2
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,483

    Cool


    You may be trying to update the same row several times, see Metalink Note:137202.1
    "The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width