query to combine data from 2 tables into 1 view

  • i have an archive table and current table, both with same columns.

    for reporting purposes i'd like a query to combine data from both tables. SELECT INTO will work but it produces a new table which seems unnecessary. is there a way to create a view of the combined data?

    thanks for any help

  • Select col1, col2 from dbo.archive

    union all

    select col1, col2 from dbo.MainTable

  • SELECT Column1, Column2 FROM OldTable

    UNION ALL

    SELECT Column1, Column2 FROM NewTable

  • Bugger, sorry about that, didn't notice the reply above

  • Don't be... happens more often than you think . Thanx for helping.

  • that's exactly what i was looking for - thanks very much

Viewing 6 posts - 1 through 5 (of 5 total)

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