Solved

Use two database for select and insert

Posted on 2013-11-29
3
298 Views
Last Modified: 2013-11-29
Dear Experts,
I have two different databases. need to connect one to get data and second to insert.

Insert into abc.dbo.a(ID)
Select id from xyz.dbo.d(id)

How i could execute this task please guide
0
Comment
Question by:Mehram
  • 2
3 Comments
 
LVL 9

Expert Comment

by:guswebb
ID: 39685952
SELECT [xyz].[dbo].[d].[id] INTO [abc].[dbo].[a]
0
 

Author Comment

by:Mehram
ID: 39685966
Sir, the both table already exist. Into will create another table I need make join between both databases to get result and insert into the particular table.
0
 
LVL 9

Accepted Solution

by:
guswebb earned 500 total points
ID: 39685979
INSERT INTO [abc].[dbo].[a] (id) SELECT id FROM [xyz].[dbo].[d]
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now