Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old April 4th, 2002, 05:36 AM
sgaucho sgaucho is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Posts: 26 sgaucho User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 28 sec
Reputation Power: 0
update in MySQL

[Sandeep Murphy]

Hi,



I need to update an entire table in one database with the values from another database... My query reads like this:

update palmeira.t_colaboradores t, hr.member_status s, hr.member_data d

set t.structure=s.structure, t.depart_area=s.area where t.cs_id=d.cs_id and d.cs_id=125
[Sandeep Murphy]

in the query, plameira and hr are the 2 diff databases....

any suggestions as to how to make this work???

tia,

sands
P.S: am using MySQL server 3.23

Reply With Quote
  #2  
Old April 10th, 2002, 07:54 AM
oscagne oscagne is offline
Java Developer
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2001
Posts: 5 oscagne User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I wouldn't do this in java unless they were small tables, and if so then why not do it by hand. I'd have thought it'd be slow, and if you wanted to do it on a regular basis, more relevantly it'd be a waste of coding time

There are loads of tools about one of them is sure to do database table migration (more than likely a db backup tool).

It could be done though by getting 2 db connections, and getting a result set from one and writing from cycling through it to the other

Reply With Quote
  #3  
Old April 10th, 2002, 07:57 AM
sgaucho sgaucho is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Posts: 26 sgaucho User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 28 sec
Reputation Power: 0
solved it sometime bak... was too slow using java... used a php script to do it...


thnx anyway..

cheers,
sands

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > update in MySQL


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway