Explode dates in data flow task

  • I have been struggling with this, and I am starting to think this is impossible to do inside a data flow task.

    I have records that have measures associated for a time frame. I want to divide these values evenly amongst the days and create multiple records, corresponding to each day. However, I can't figure out how to map this one to many relationship in an SSIS data flow task.

    I wish there was a way to do a between join, but from what I read, we aren't able to do it.

    Do you have any ideas how to explode my date range records into daily records?

    Feel free to throw any idea out there, I am absolutely struggling!

  • Well, it is hard to provide you with any ideas when we can't see what you see. It would help if you could provide us with the DDL for the tables involved (CREATE TABLE statements), the format of the input data, sample data for the tables and input data, and the expected results when all is said and done.

    Please read the first article I reference below in my signature block for help with what you need to post and how to do it.

  • it kind of sounds like you need a calendar table;

    that way, you could select every possible date from the calendar table, and then left join it to the data you DO have;

    without more details, I can only offer some vague suggestions.

    http://www.sqlservercentral.com/search/?q=calendar+table

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply