Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

SQL Server import data from Excel

Posted on 2011-03-11
2
Medium Priority
?
290 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 2000 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

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

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, …
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

876 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