What I want to Achieve?
I am trying to generate Customer details into one single table. The customer Names and Addresses are in 2 different tables so I have created the below VIEW
SELECT dbo.Customer.CustomerId, dbo.Customer.GivenName + ' ' + dbo.Customer.FamilyName AS [CustomerName], dbo.Customer.DOB, dbo.Customer.Gender,
dbo.Address.PostCode AS [Post Code], dbo.Address.Town AS Suburb, dbo.State.Code AS State
FROM dbo.Address INNER JOIN
dbo.Cusotmer ON dbo.Address.AddressId = dbo.Customer.AddressID INNER JOIN
dbo.State ON dbo.Address.StateId = dbo.State.StateId
Question
How can I turn DOB into Age in the same view table ?
DOB is a Date Column in this formate : 2015-03-25