Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Import toggled excel sheet into SQL server using ssis Expand / Collapse
Author
Message
Posted Monday, August 26, 2013 12:07 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Tuesday, August 26, 2014 5:50 AM
Points: 63, Visits: 293
Hi,
I have an excel sheet with 3 columns
a. Application Name
b. Group Name
c. User Name

I want to import the excel sheet into sqlserver. My problem is that excel sheet contains toggled column. i. e Application name is my parent group(root level ) and Group Name name is my child group and User name is child of Group Name group. When am trying to import to sql tables , the grouping columns having null values. Only one column contains data.

I have attached the sample format of my excel sheet with this mail.



  Post Attachments 
SecurityObjects_UAT.xls (5 views, 48.00 KB)
Post #1488291
Posted Monday, August 26, 2013 10:51 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 12:31 PM
Points: 11,265, Visits: 13,027
Might not be the best solution but I'd probably have a script task as second step (first step is the source) that sets the NULL/empty application name to the previous row's application name and the same thing for the group name. Then I'd filter out rows where group name or user name is NULL/empty which would just be the first row in each group and application that has no meaningful data



Jack Corbett

Applications Developer

Don't let the good be the enemy of the best. -- Paul Fleming

Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
How to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
Post #1488453
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse