Im a Newbie to SQL Server
Could you help me out with updating a table within the same database -the Database Name is Staff.
I have 2 tables (I am trying to update the StaffID field in tblstaff with data from StaffID field in tblStaff_old )
the old one is tblstaff_old the new one is tblstaff
I have tried this code but is keeps telling me 0 rows updated.
UPDATE dbo.tblStaff
SET StaffID = dbo.tblStaff_Old.StaffID
FROM dbo.tblStaff_Old;
Thank You :)