We have a SQL View, trying to find the calculation/business logic for each column into a select or table.
create dbo.CustomerVw as FirstName + ' ' LastName as FullName datediff(yy,BirthDate,GETDATE()) as Age, 'New York' as CityReason from dbo.Customer
Row 1: FullName: FirstName + ' ' + LastName Row 2: Age: datediff(yy,BirthDate,GETDATE()) Row 3: City: New York
Code below only displays table code as large text. How would separately display each calculation logic for columns? Each Column row can be a text.
SELECT v.TABLE_NAME, v.VIEW_DEFINITION FROM INFORMATION_SCHEMA.VIEWS v WHERE v.TABLE_NAME LIKE '%%'