Solved

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

Posted on 2010-09-07
5
377 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
ID: 33621530
Are you using ssis ?
0
 
LVL 8

Expert Comment

by:dba2dba
ID: 33627425
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
ID: 33629465
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
ID: 33630033
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
ID: 33641619
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Sql Query 4 39
Trying to get a Linked Server to Oracle DB working 21 60
get column names from table in vb.net 8 29
SQL Insert parts by customer 12 34
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

777 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