Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Import toggled excel sheet into SQL server using ssis


Import toggled excel sheet into SQL server using ssis

Author
Message
Sony Francis @EY
Sony Francis @EY
Valued Member
Valued Member (67 reputation)Valued Member (67 reputation)Valued Member (67 reputation)Valued Member (67 reputation)Valued Member (67 reputation)Valued Member (67 reputation)Valued Member (67 reputation)Valued Member (67 reputation)

Group: General Forum Members
Points: 67 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.
Attachments
SecurityObjects_UAT.xls (5 views, 48.00 KB)
Jack Corbett
  Jack Corbett
SSChampion
SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)

Group: General Forum Members
Points: 11022 Visits: 14858
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
At best you can say that one job may be more secure than another, but total job security is an illusion. -- Rod at work

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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search