• Shadab Shah (9/2/2012)


    I have a table which contains data for 12 months. Now i want to delete the data for the month of Aug, and insert new data which is present with me. For which i would do the following

    delete from MyTable where Cdate between ('2012-08-01','2012-08-31')

    Now my question is How to insert the new data into database. Is it like writing 31 insert statement?

    I'm pretty sure the answer is "NO" but have to make sure... do any of those dates have times other than midnight on them? Also, what is the data-type of the Cdate column?

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