If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Microsoft SQL Server > Update table in a database from another databse

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-08-11, 01:23
malitha malitha is offline
Registered User
 
Join Date: Jun 2011
Posts: 2
Question Update table in a database from another databse

i have a problem i need to update a database table from another database in the sql server.wondering if some can help me how to make this happen .i have no clue to startup this.some help will be grateful .thanx
Reply With Quote
  #2 (permalink)  
Old 06-08-11, 01:41
JackVamvas JackVamvas is offline
Registered User
 
Join Date: Aug 2008
Posts: 48
Assuming the two databases (source & target) are on the same SQL Server - it's a matter of referencing the other database in the statement using a multip part reference.

If the source & target are on separate SQL Servers - set up a Linked Server on the target database to the Source database.Ensure you have relevant permissions on the databases. Then reference as a multipart reference in your UPDATE statement
__________________
---------------------------------
www.sqlserver-dba.com
www.dba-db2.com
Reply With Quote
  #3 (permalink)  
Old 06-08-11, 01:48
malitha malitha is offline
Registered User
 
Join Date: Jun 2011
Posts: 2
yes its on the same sql server.thanx ..i'll try... i haven't done these before i still a student ...again thanx 4 da info
Reply With Quote
Reply

Tags
sql server 2008, update another database, update multiple databases, update query

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On