Solved

SQL Server import data from Excel

Posted on 2011-03-11
2
283 Views
Last Modified: 2012-05-11
I have been sent an excel file that contains data from two tables.  The execl file contains a tab for each table.  One column in one of the tabs has the references to the other table.  So I guess the original database has three tables.  The third table being all the joins between the other two.

Is there a way to import the excel file so that it creates both the tables but the "third" table with the joins?
 
0
Comment
Question by:soozh
2 Comments
 
LVL 6

Accepted Solution

by:
jonaska earned 500 total points
ID: 35108188
A thrid table would be used to describe a many-to-many relation. Which can't be easyly described in two tables (or tabs in your case).
I would guess that your two tabs respresents two table with a one-to-many relation.

Anyway, you can use SSIS to import the data to sql server. Use a Data Flow with an Excel Source.
0
 
LVL 21

Expert Comment

by:Alpesh Patel
ID: 35108307
Yes,jonaska is right.

If it is routine work then its good to be automated using SSIS packages. All relation are maintain in normal import export wizard also.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Audit has been really one of the more interesting, most useful, yet difficult to maintain topics in the history of SQL Server. In earlier versions of SQL people had very few options for auditing in SQL Server. It typically meant using SQL Trace …
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

828 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