Adding a new column in update query RRS feed

  • Question

  • Hi all,


    Is it possible to add a new column in an update query? I am joing two tables  with [Encountered Month] from Table 1 and [Calendar Date] from table 2 and trying to add one column[Fiscal Month] into the first table where  dbo.table1.[Encountered Month]=dbo.table2.[Calendar Date]

    Appreciate your help.

    Friday, September 24, 2010 10:42 PM


  • You can not add a new column in an update query (if the column is not defined in the table). You can add computed column to the select query.
    Premature optimization is the root of all evil in programming. (c) by Donald Knuth

    Naomi Nosonovsky, Sr. Programmer-Analyst

    My blog
    • Proposed as answer by Sach Vaidya Saturday, September 25, 2010 11:40 PM
    • Marked as answer by Alex Feng (SQL) Monday, October 11, 2010 10:47 AM
    Friday, September 24, 2010 11:20 PM