Can you UPDATE a temp table?

  • Hello,

    SQL 7 w/SP2

    Can you update the values in a temp using UPDATE and values from another temp table? my code keeps bobmbing. any suggestion would be greatly appreciated.

    create table #jeff_MinFilesize (

     Col_1 varchar(50),

     col_2 int

    &nbsp

    ---> INSERT statement used her to populate #jeff_MinFilesize <which works>

    create table #jeff_combo (

     col_1 varchar(50),

     col_2 int,

     col_3 int )

    update #jeff_combo

    set col_1 = (select col_1 from #jeff_MinFilesize)

    select * from #jeff_combo

    ---> (0 row(s) affected)

    Many thanks. Jeff

  • Looks like you are attempting to update the #jeff_combo table before putting any data in it. Try changing the update #jeff_combo to insert #jeff_combo



    Shamless self promotion - read my blog http://sirsql.net

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply