Solved

SQL Server import data from Excel

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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 …
Long way back, we had to take help from third party tools in order to encrypt and decrypt data.  Gradually Microsoft understood the need for this feature and started to implement it by building functionality into SQL Server. Finally, with SQL 2008, …
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

706 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

19 Experts available now in Live!

Get 1:1 Help Now