Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

update multiple columns at once

 
Toni Wilkinson
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Not sure if this is the correct forum to post this but will give it a go.

I am using JDeveloper to create an update page for a table on a database. The end user will only have one update field to update a number in say column A. However there is also another column in my table that should always hold identical information to Column A. Lets call it Column B. How do I get the update on A to automatically update B without having to get the user to have two fields to fill out with identical information. I am using getters and setter methods in a Entity Object.

Can anyone help? Let me know if need to give more info or if there is a more appropriate place to post this

Thanks

Toni
 
Martin Vajsar
Sheriff
Posts: 3752
62
Chrome Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If a table should always keep identical data in column B, why to keep that column in the table at all? It is a strange requirement which probably indicates a less than optimal design somewhere. But if you really need such a setup - two identical columns A and B - you can easily achieve that by only having the column A in the table and creating a view containing all the table's columns plus another instance of column A aliased to "B".
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic