Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6530209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:43:40+00:00 2026-05-25T09:43:40+00:00

MERGE INTO table_1 a USING (SELECT * from table_2) b ON ( a.row_id =

  • 0
MERGE INTO table_1 a   
USING      
 (SELECT * from table_2) b  ON ( a.row_id = b.row_id and a.in_correct IS NULL) 
WHEN MATCHED THEN UPDATE SET a.in_correct = 'Y'; 

In the above query ORA-38104:Column referenced in ON clause cannot be updated.

I have been sitting for hours to resolve this.

I have identified that the problem is the field in_correct.

This field “in_correct” cannot be put in both ON clause and also after SET. But in order satisfy my criteria,I have no option.

Please help me out

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T09:43:41+00:00Added an answer on May 25, 2026 at 9:43 am
    MERGE INTO table_1 a USING
        (SELECT * from table_2) b 
    ON ( a.row_id = b.row_id) 
    WHEN MATCHED THEN UPDATE 
      SET a.in_correct = NVL(in_correct, 'Y');
    

    UPDATE:

    A more “general” command (for non null values):

    MERGE INTO table_1 a USING
        (SELECT * from table_2) b 
    ON ( a.row_id = b.row_id) 
    WHEN MATCHED THEN UPDATE 
      SET a.in_correct = case 
                     when in_correct = 'valuetobereplaced' then 'Y'; 
                     else in_correct; 
                     end;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got 2 queries I'd like to merge into 1 result set without using
The following statement is in a Stored Procedure MERGE INTO table1 a USING (SELECT
How can you get the number of affected rows from executing a MERGE INTO...
I am using merge command to insert a non-exist record into table. When I
I'm using mergeForm to display a form and then another merged into it. The
I have two classes that I would like to merge into a composite. These
I have this simple example I can't seems to get working : MERGE INTO
I've got many, many mp3 files that I would like to merge into a
I have huge number of Word files I need to merge (join) into one
I have two arrays. I'd like to merge them into one, but remove the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.