al4629740
asked on
transfer data in one table to another table's column
I have two tables. AttendanceGrid and frmRegistrationCSW. AttendanceGrid has duplicated IDs and frmRegistrationCSW has NO duplicated IDs
I have several records in frmRegistrationCSW where the ID is related to the ID in AttendanceGrid. For example ID # 784 in frmRegistrationCSW is the referenced to ID # 784 in AttendanceGrid
There is an Age column in frmRegistrationCSW that I would like to copy to all equivalent records in AttendanceGrid.AgeReg
Is the following code correct for doing this?
I have several records in frmRegistrationCSW where the ID is related to the ID in AttendanceGrid. For example ID # 784 in frmRegistrationCSW is the referenced to ID # 784 in AttendanceGrid
There is an Age column in frmRegistrationCSW that I would like to copy to all equivalent records in AttendanceGrid.AgeReg
Is the following code correct for doing this?
UPDATE R14
SET R14.AgeReg= R13.Age
from AttendanceGrid R14
INNER JOIN frmRegistrationCSW AS R13
ON R13.ID = R14.ID
AND R13.fiscal = 2014
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.