Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6616547
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:35:46+00:00 2026-05-25T20:35:46+00:00

I am attempting to normalize data using SSIS in the following format: SerialNumber Date

  • 0

I am attempting to normalize data using SSIS in the following format:

SerialNumber  Date       R01  R02  R03  R04 
-------------------------------------------
1             9/25/2011  9    6    1    2
1             9/26/2011  4    1    3    5
2             9/25/2011  7    3    2    1
2             9/26/2011  2    4    10   6

Each “R” column represents a reading for an hour. R01 is 12:00 AM, R02 is 1:00 AM, R03 is 2:00 AM and R04 is 3:00 AM. I would like to transform the data and store it in another table in this format (line breaks for readability):

SerialNumber  Date                Reading
-----------------------------------------
1             9/25/2011 12:00 AM  9    
1             9/25/2011 1:00 AM   6    
1             9/25/2011 2:00 AM   1   
1             9/25/2011 3:00 AM   2   

1             9/26/2011 12:00 AM  4    
1             9/26/2011 1:00 AM   1    
1             9/26/2011 2:00 AM   3   
1             9/26/2011 3:00 AM   5   

2             9/25/2011 12:00 AM  7    
2             9/25/2011 1:00 AM   3    
2             9/25/2011 2:00 AM   2   
2             9/25/2011 3:00 AM   1

2             9/26/2011 12:00 AM  2    
2             9/26/2011 1:00 AM   4    
2             9/26/2011 2:00 AM   10   
2             9/26/2011 3:00 AM   6

I am using the unpivot transformation in an SSIS 2008 package to accomplish most of this but the issue I am having is adding the hour to the date based on the column of the value I am working with. Is there a way to accomplish this in SSIS? Keep in mind that this is a small subset of data of around 30 million records so performance is an issue.

Thanks for the help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T20:35:46+00:00Added an answer on May 25, 2026 at 8:35 pm
    1. Create a SSIS package and add a new Data Flow Task and configure this DFT (Edit...)
    2. Add a new data source
    3. Add UNPIVOT component and configure it thus:
      enter image description here
    4. Add DATA CONVERSION component:
      enter image description here
      Temporary results:
      enter image description here
    5. Add DERIVED COLUMN component:
      enter image description here
      For NewData derived column you can use this expression: DATEADD("HOUR",(Type == "R01" ? 0 : (Type == "R02" ? 1 : (Type == "R03" ? 2 : 3))),Date). «boolean_expression» ? «when_true» : «when_false» operator is like IIF() function (from VBA/VB) and is used to calculate number of hours to add: for “R01” -> 0 hours, for “R02” -> 1 hour, for “R03” -> 2 hours or else 3 hours (for “R04”).

      Results:
      enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Attempting to deserialize JSON data and update each object's prototype and inherit a common
Attempting to use the data series from this example no longer passes the JSONLint
When attempting to compile my C# project, I get the following error: 'C:\Documents and
Attempting to set up Samba + OpenLDAP using nss_ldap. After joining Windows7 to Samba
Attempting to use the amazon API to obtain product data and currently failing miserably.
While attempting to execute SQL insert statements using Oracle SQL Developer I keep generating
while attempting to run rake, I run into the following error: heroku rake db:migrate
Attempting to take the data in my gridview and convert it back into a
Attempting to profile the difference in runtime between 1+1 and 1x2 using Ruby and
While attempting to render a 3D object using OpenGL (and the GLFW library), the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.