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
 Multiple Excel Sheets
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

LedZeppelin
Starting Member

Netherlands
3 Posts

Posted - 04/18/2007 :  06:00:47  Show Profile  Reply with Quote

Hello all!

Actually I've got multiple questions - but will start with 1. :)

My task in three words:
Use Grand Prix data and make it so that you can ask questions to it via SQL Server or by using Excel.

What I did so far:
I gathered the GrandPrix data from f1db.com - I stored the data in multiple Excel Files - I created a Formule1 database - I created separate packages for all the data. Which means, im cloning the data from Excel to SQL Server.

What I'm doing now:
In SQL Server Management Studio I am creating new tables in which I store (using SQL queries) the data from the packages that I loaded into the Database. This is going very well so far - and I'm proud of that. ;)

The problem:
Most Excel files have only 1 sheet and where the first row are the identifying column-names. I now however have 1 Excel files that exists of multiple sheets, perhaps 40 or something. I could create a package and run this which would result in 40 new tables in SQL Server Management Studio. I bet that would work just fine. But how - and here comes the main question - do I copy information from those 40 tables (former sheets) into 1 new table.

it's hard to explain what I want to be the result...

Ok, i made a screenshot and added some notes that makes the whole situation more clear:
direct link: http://img243.imageshack.us/img243/9462/whatimtryingfx9.png

I suppose this requires a complex SQL Query, hopefully someone can help me out or point me into the right direction. Much appreciated!

Thank you.
LedZeppelin


'Does anybody remember laughter?' - Robert Plant

Edited by - LedZeppelin on 04/18/2007 06:03:11

LedZeppelin
Starting Member

Netherlands
3 Posts

Posted - 04/23/2007 :  02:55:49  Show Profile  Reply with Quote
is there really nobody who can help? it'd be greatly appreciated. :D

'Does anybody remember laughter?' - Robert Plant
Go to Top of Page

SatyaSKJ
Starting Member

United Kingdom
46 Posts

Posted - 04/23/2007 :  04:32:33  Show Profile  Visit SatyaSKJ's Homepage  Send SatyaSKJ a Yahoo! Message  Reply with Quote
You can create sheets in the existing table using Execute SQLTash to create number of sheets that are present in that Excel file too.

Satya SKJ
SQL Server MVP
http://www.sqlserver-qa.net
Go to Top of Page

LedZeppelin
Starting Member

Netherlands
3 Posts

Posted - 04/23/2007 :  06:14:54  Show Profile  Reply with Quote
SayaSKJ, thank you for your reply. I'm not sure what you mean. However, if I execute the package which contains all the data from the 40 sheets or so I get 40 new tables in Management Studio.

Now I want some SQL query that can extract that data and put it in 1 new Table in Management Studio. (see screenshot in the first post for an overview of how I want the structure to be)

'Does anybody remember laughter?' - Robert Plant
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.08 seconds. Powered By: Snitz Forums 2000