SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Import data from multiple Sheets Excel
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

xhostx
Constraint Violating Yak Guru

USA
277 Posts

Posted - 10/03/2012 :  11:09:19  Show Profile  Reply with Quote
Hi all,
I have a spread Excel Sheet with Three (3) Sheets. 
1st: has all Customers
2nd: rows refers to customers on 1st sheet
3rd: rows refers to customers on 1st sheet
===>
               One-to-many              One-to-Many
     |Sheet2| --------------> |Sheet1| <------------- |Sheet3|
===>
I need to Export all data to SQL Server 2008. I'm willing to create tables with respect to referential integrity.
I'm thinking to export one by one but I thought maybe a better way to do it.
What are some suggestions please for this process?


--------------------------
Joins are what RDBMS's do for a living

visakh16
Very Important crosS Applying yaK Herder

India
52249 Posts

Posted - 10/03/2012 :  12:04:14  Show Profile  Reply with Quote
you've to thos one by one
first one to start is sheet1
then do others which can be done in parallel after adding lookup to first table created

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

xhostx
Constraint Violating Yak Guru

USA
277 Posts

Posted - 10/03/2012 :  13:40:04  Show Profile  Reply with Quote
OK, sounds good. Visakh! thanks man a lot.
I'm planning on using just an export/import wizard to do.
would this be better done using an SSIS package. IF so, please, list the possible tasks to be used.
Thanks.

--------------------------
Joins are what RDBMS's do for a living
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52249 Posts

Posted - 10/03/2012 :  14:06:25  Show Profile  Reply with Quote
yep..you can add ssis task

first task would be a data flow task for exporting data from sheet1 with excel source and oledb destination
it has to then followed by another data flow task which has two parallel data flows one from each of other sheets to destination tables. the first data flow is connected to second by means of an onsuccess precedence constraint

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

xhostx
Constraint Violating Yak Guru

USA
277 Posts

Posted - 10/03/2012 :  14:29:53  Show Profile  Reply with Quote
thank you visakh a lot. Appreicated.

--------------------------
Joins are what RDBMS's do for a living
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52249 Posts

Posted - 10/03/2012 :  14:40:54  Show Profile  Reply with Quote
welcome

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.12 seconds. Powered By: Snitz Forums 2000