Solved

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

Posted on 2010-09-07
5
374 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

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 2012 R2 Express report problem 2 83
Determine log file requirements 7 34
triggered use of sp_send_dbmail failure 2 22
MS SQL Inner Join - Multiple Join Parameters 2 18
A recent questions about how to add SSRS named instances, couldn't find any that talks about SQL server 2008, anyway I decided to help by creating some screen shots. The installation is straightforward, you just pop the SQL server 2008 installati…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Edureka is one of the fastest growing and most effective online learning sites.  We are here to help you succeed.

911 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

24 Experts available now in Live!

Get 1:1 Help Now