Home Forums SQL Server 2005 T-SQL (SS2K5) inserting horizontal records from table1 as vertical records in table2 RE: inserting horizontal records from table1 as vertical records in table2

  • INSERT INTO table2

    SELECT FDT1, TODT1 FROM table1

    UNION ALL

    SELECT FDT2, TODT2 FROM table1

    Edit: corrected the code with comma's between the columns

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **