I have a table with composite primary key based on three columns.
(Unit, Account, service)
I have another two columns: DOB
(this holds date of birth) & Age
(this is a new int column which needs to be updated based on DOB and the result will be integer value of years)
I know how to retrieve the reslt for Age
select datediff(Year,DOB,GETDATE()) as AGE
But not sure how to update entire table based on the rows DOB data.
Columns are Unit, Account, Service, DOB, Age