• mister.magoo (5/22/2013)


    insert mytable(col1,col2,col3,col4)

    select

    col1 = myothertable.col3

    , col2 = getdate()

    , col3 = newid()

    , col4 = 'foo'

    from myothertable

    where foo='bar';

    The one draw back with this method, I just noticed :-D, is that you must specify all the columns in the table. If you are only updating 5 columns out of 20 ... Oh well.

    Tobar (5/16/2013)


    Change is always possible. There once was a time when you could not do "positional or named parameters". Hope springs eternal.

    Maybe there is hope that they will change it so that you don't have to specify all when you use "assignment style" or whatever it will be called. :w00t:

    <><
    Livin' down on the cube farm. Left, left, then a right.