Solved

How to load an Excel File into SQL server 2008 where data are not in order

Posted on 2010-09-07
5
371 Views
Last Modified: 2012-05-10
Hello I have a sample file named "Source.xls"  attached here for how I am getting the file from the source.
I want to load this file into SQL server 2008 DB with a order like the target format excel named "Target Format for load " attached here.

I am also not sure if the target is correct as I feel a bit hard to manage the historical data.
I want to maintain the history data for the source file.

Can any one suggest the best way to maintain this type of source data.
Note: I don't have any direct access to any DB except the target DB. This is the only way i can get the data. Please suggest the best way to handle the target structure.


Source.xls
Target.xlsx
0
Comment
Question by:ushastry
5 Comments
 
LVL 14

Expert Comment

by:Emes
Comment Utility
Are you using ssis ?
0
 
LVL 8

Expert Comment

by:dba2dba
Comment Utility
You can try using Import Export wizard or use an SSIS Package.

Below is some good information:

http://www.accelebrate.com/sql_training/ssis_tutorial.htm
0
 
LVL 26

Author Comment

by:ushastry
Comment Utility
I am not using SSIS but i need if something can do this and I can get this data loaded into SQL server ,

But I can do this my importing it but if I want to maintain the data history then it is pitty much difficult as the source gives me the dates in columns and if in future I get some more dates which modification then thats where it is a big problem for me.
0
 
LVL 26

Author Comment

by:ushastry
Comment Utility
If i use SSIS package to be created then can I store this type of data in one table.
If I get the source like this then will I be able to keep the history if I get similar kind of data of other users and may be with same dates ?
0
 
LVL 10

Accepted Solution

by:
itcouple earned 500 total points
Comment Utility
Hi

It would be difficult to load the data in this format. I suggest to write a small macro to create 'flat file' which would convert columns into rows so it would look the same as your table and the table should look something like that:

Segment, Team, DisplayName, Name, Calls, Duration, AverageDuration, DayWorkd and Date.

Once you have the data in this format you can import it using SSMS import/export (which will append the data) you can also save as CSV file and do bulk load into "staging" table and fire SP which will do all your 'business logic'

.... Regarding keep history I'm not entirelly sure what you mean? The data shouldn't change you just append new dates?

Hope that helps

Regards
Emil
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

A recent question popped up and the discussion heated up regarding updating a COMMENTS (TXT) field in a table using SSRS. http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/MS-SQL_Reporting/Q_27475269.html?cid=1572#a37227028 (htt…
It is helpful to note: This is a cosmetic update and is not required, but should help your reports look better for your boss.  This issue has manifested itself in SSRS version 3.0 is where I have seen this behavior in.  And this behavior is only see…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

763 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

8 Experts available now in Live!

Get 1:1 Help Now