Solved

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

Posted on 2010-09-07
5
382 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:Umesh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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:Umesh
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:Umesh
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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

Written by Valentino Vranken. Introduction: The first step of creating a SQL Server Reporting Services (SSRS) report involves setting up a connection to the data source and programming a dataset to retrieve data from that data source.  The data…
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…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

734 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