copy data from one table to the next with dufferent columns positions
I am trying to change a database from excel to mssql. After importing to MSSQL
The problem the columns heading are in different positions for example one year it is
IDNumber, First_Name, Last_Name and the following year it maybe:confused:
last_Name, First_Name, IDnumber.
I tried using
INSERT INTO TABLE2 SELECT * FROM TABLE1
but I am getting
Msg 213, Level 16, State 1, Line 1
Column name or number of supplied values does not match table definition.
My question is must the columns heading be in the same order to copy data from one table to the next