• Julian Kuiters (2/9/2006)


    Sound similar to something I wanted to do a long time ago. I quickly knocked up an example today, so here's an article I wrote for you:

    <a href="http://www.juliankuiters.id.au/article.php/ssis-lookup-with-range">SSIS Lookup with value range</a>

    http://www.juliankuiters.id.au/article.php/ssis-lookup-with-range

    let me know if it doesn't work for you.

    Hi Julian,

    I'm just trying to apply something very similiar. What I am trying to acheieve is a SSIS package that I can use on a daily run, as well as date ranges, picking up the relevant location SCD record for the a give 'pick date'.

    My source contains the location and a 'pick_date' that I need to use in a location_dim lookup.

    I've configured my Lookup SSIS task SQL Statement as:

    select * from

    (select * from [dbo].[location_dim]) as refTable

    where [refTable].[location] = ?

    and ( ( [refTable].[effective_start_dt] >= ? and [refTable].[effective_end_dt] <= ? )

    or ( [refTable].[effective_start_dt] >= ? and [refTable].[effective_end_dt] IS NULL )

    )

    couple of things have happened - the package now takes 12 minutes to run (previously it took about 20 seconds!)

    Also, it doesn't pair up any values - everthing is redirected to the error output?

    so

    a) is the best way to speed this up to put an index on the location dimension or is it likely something else is going on here?

    b) Is my logic wrong ? I re-read it and it seems ok, so I'm a little miffed as to why it's not finding a record?

    You help would be appreciated

    thanks.

    _____________________________________________________________________________MCITP: Business Intelligence Developer (2005)