filter monthly activity file from yearly file

  • Client send a YEARLY Data file every month and I want to take that YEARLY file and filter the date for the current month i.e. lets says client sends me today January month 2016 a file that has worth all of 2015 and I want only December data how do I filter it ?

  • You posted this same question in another forum, and I replied there.

    Please do not double-post.


    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/

  • Thanks Hugo, Not sure if this is TSQL or ETL question so posted on both, please advise ?

    So let me rephrase the question

    We would take the full file (Dec file) , compare/ check it to prior records imported (Nov file) and ignore the duplicate records and then write out a new member import file which only contains records that have changed.

    I believe EXCEPT Operator should do the job ?

    Select * from Decfile data

    except

    Select * from Novfile data

  • Rankerg (1/10/2016)


    Thanks Hugo, Not sure if this is TSQL or ETL question so posted on both, please advise ?

    Doesn't matter. Most of us monitor all the forums and so the title of the post is more important than which forum you post it on.

    To Hugo's point, it doesn't make sense to split up any already existing answers so let's discontinue this thread in favor of the one that has some work already done. That thread may be found at the following URL.

    http://www.sqlservercentral.com/Forums/Topic1751048-3077-1.aspx#bm1751209

    In other words, no more posts on this thread, please. Instead, go to the URL above. Thanks.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

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

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