• Phil Parkin (5/23/2013)


    Bhaskar.Shetty (5/23/2013)


    You cannot call insert like that, = operator works while you are updating any row or table.

    Before making blanket statements like this, I find that it is always best to double-check, lest you are left looking silly in perpetuity:

    create table #test (ID int)

    insert into #test

    (ID)

    select Id = 1

    union all

    select Id = 2

    select *

    from #test as t

    Heh,

    The only one who "left looking silly in perpetuity" is actually you, Phil.

    :w00t:

    Your example actually proves the "blanket statement" from Bhaskar.Shetty:

    it inserts 2 rows, and it uses 2 "=" operators.

    2/2 = 1 row per each operator: exactly whar Bhaskar been saying!

    😛

    What does not make that statement totally right thought...

    _____________
    Code for TallyGenerator