Home Forums SQL Server 2005 T-SQL (SS2K5) Help with sql statement to delete old records for user if multiple records found RE: Help with sql statement to delete old records for user if multiple records found

  • I guess the original sin here is that some valuable statistical information has been deleted forever. I would never delete such data until I had squirreled it away somewhere. No telling when some manager is going to ask questions like "I need to know what the hourly average of online sessions was per hour per day for the last 6 months with a comparison of that same time frame from a year ago so we can show our stockholders how business has improved from an online perspective." The look on his/her face will be extra special when you tell him/her that you deleted it even if it were because that same manager told you to do the deletes.

    Protect the less informed and yourself... never delete data until you know you can get it back and have tested it. 😉

    --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)