• trubolotta (9/22/2010)


    thisisfutile (9/22/2010)


    @trubolotta Not trying to start an argument here, but hindsight is 20/20 for everyone. Sometimes we find ourselves in a situation like the OP is describing (or something similar) and we need a solution.

    No mal-intentions assumed, but the idea this "code" is efficient is ludicrous because is suggests it must be run periodically. So what happens to all the bad results in between? Don't worry about those erroneous reports, we are going run our very efficient "clean-up" code shortly? Do you run this with each data entry?

    You are correct, it is a problem to deal with but it is not a fix nor is it viable for a production scenario. My own experience indicates that datra cleansing is a highly variable problem and requires ingenuity and coding expertise, but it is also a one-shot deal.

    Not everyone who frequents SSC is a DBA or has the ability to change table structures. Some of us just need to be able to quickly remove dupes from resultsets for reporting, and not all columns are able to apply a DISTINCT to it. This is an easy solution that does the job well.

    ---------------------------------------------------------
    How best to post your question[/url]
    How to post performance problems[/url]
    Tally Table:What it is and how it replaces a loop[/url]

    "stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."