Solved

SQL Server import data from Excel

Posted on 2011-03-11
2
280 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
triggered use of sp_send_dbmail failure 2 23
SQL Exceptions 3 39
Dimension table indexes 8 13
Sql Query with datetime 3 12
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…
In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

895 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

13 Experts available now in Live!

Get 1:1 Help Now