I have a database table (Employee) with following fields: EmpID, EmpName. I have a second table (EmployeeVersion) with following fields: PKID(auto), EmpID, EmpName, Month, Year.
What would be the quickest way to copy data from Employee table to EmployeeVersion table. The Month, Year would either contain the month and the year when the data was copied or values sent to Stored procedure (@Month, @Year) from c# code. Please provide solution for both scenarios.
As far as I know, I can't used following statement because the number of columns don't match in both tables:
Insert Into EmployeeVersion (EmpID, EmpName, Month, Year) select * from Employee
Please advice. Thanks.