I have two tables.
- NewTransaction_tb
- OldTransaction_tb
I want to move the records from old to new table including date. But the OldTransaction_tb it doesn't have the Date column.
This is what I am trying.
For example
DECLARE @VarDate Datetime = CONVERT(datetime,GETDATE(),102)
INSERT INTO HQMatajer.dbo.NewTransaction_tb
SELECT
Name, class, Qualification, @VarDate //this @VarDate is not in OldTransaction_tb
FROM
HQMatajer.dbo.OldTransaction_tb
What is the solution for this scenario? Thanks,