Solved

SQL Server import data from Excel

Posted on 2011-03-11
2
285 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL Recursion 6 47
SQL - Curser to do an insert based on a select 2 29
Trying to understand why my Index is so large 12 52
What does "Between" mean? 6 47
SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

739 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