This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes UPDATE multiple columns with subquery Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "UPDATE multiple columns with subquery" Watch "UPDATE multiple columns with subquery" New topic
Author

UPDATE multiple columns with subquery

Justin Chu
Ranch Hand

Joined: Apr 19, 2002
Posts: 209
    
    1
Suppose I've two tables CUSTOMERHOMEADDRESS and CUSTOMERWORKADDRESS with similar columns.

How do I write one update statement to copy 5-8 columns from CUSTOMERWORKADDRESS into CUSTOMERHOMEADDRESS?

I'd imagine it will take repeated subquery to achieve this:

[ March 06, 2007: Message edited by: Chu Tan ]
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: UPDATE multiple columns with subquery
 
It's not a secret anymore!