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

  • SEARCH
  • Home
  • 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 6606815
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:26:10+00:00 2026-05-25T19:26:10+00:00

I have an INSERT/UPDATE Procedure that will only seem to update when I change

  • 0

I have an INSERT/UPDATE Procedure that will only seem to update when I change the existing “name”.

I added a code field to the java, and want to update the code to the existing table without having to modify the “name” because it already exists. If I modify the “name” then the “code” will get updated to that row in the table.

Can someone help me understand whats going or what I need to modify?

thanks

PROCEDURE update_things
  (things IN OUT things_bean, user_id IN NUMBER)
IS
  t_things   things_bean;
BEGIN
  -- If there is already an id set ... this is an update
  IF things.ID <> 0
  THEN
     SELECT things_bean (ID, NAME, code, work, foo)
       INTO t_things
       FROM things
      WHERE things.ID = ID;


     IF NOT things.equals (t_things)
     THEN

        things.foo:= t_things.foo;

        things.foo.modified_date := SYSDATE;
        things.foo.modified_by := user_id;

        UPDATE things
           SET NAME = things.NAME,
                              code = things.code,
               foo= things.foo
         WHERE ID = things.ID;
 END IF;                                                                                           


END update_things;
  • 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-25T19:26:10+00:00Added an answer on May 25, 2026 at 7:26 pm

    looks to me like you should check this call:

    things.equals(t_things)
    

    to make sure your code value is part of the equality check.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Say I have a stored procedure consisting of several separate SELECT, INSERT, UPDATE and
I have a mobile app that is using LinqToDatasets to update/insert into a SQL
I have a table that has a Trigger associated with it for Update, Insert
I have a stored procedure that runs to update gaming points for user balances.
I have just written a stored procedure and stored function that serve to insert
Scenario I have a stored procedure written in T-Sql that I use to insert
Trying to do an insert, I have: jdbcTemplate.update(insert into...., new Object[]{foo.getId(), foo.getName()}) foo.getId() returns
I have a DAO class which I'm using to try select/update/insert with hibernate and
I want to have an 'updateinfo' table in order to record every update/insert/delete operations
I have a form which is used to insert/display and update . In 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.