Solved

Use two database for select and insert

Posted on 2013-11-29
3
304 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
email about the whoisactive result 7 36
Sql Query 4 39
Need help how to find where my error is in UFD 6 30
domain login has permission in database, but gets error 3 16
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…
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

831 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