• hoseam (4/23/2014)


    The scenario is this..

    I have a product AGP with Fund E01, and other attributes

    then later I want to creat another product with the same attributes as AGP product, except this new product will have to be new Product name(PCC) and Fund name(E33)

    So I thought I can get that row, AGP row, put it in the temp, and update only Product and Fund, then put back the new Product back into perm table

    Is there any good reason for not using INSERT INTO...SELECT?

    INSERT INTO permtable (column_list) SELECT recalculated_stuff FROM permtable

    “Write the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

    For fast, accurate and documented assistance in answering your questions, please read this article.
    Understanding and using APPLY, (I) and (II) Paul White
    Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden