I need to get the column alias' or column descriptions from the underlying tables in a view. I have tried ::fn_listextendedproperty which successfully returns the MS_Description of table columns:select objname, name,valuefrom ::fn_listextendedproperty(default,'USER','dbo','table','TABLENAME','column',default);
But changing it to a view:select objname, name,valuefrom ::fn_listextendedproperty(default,'USER','dbo','view','SPECIFICVIEW',default,default);
does not return anything, but select objname, name,valuefrom ::fn_listextendedproperty(default,'USER','dbo','view',default,default,default);
returns two rows like this:1: v103_AssociateInfo MS_DiagramPane1 [0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00] Begin DesignProperties = Begin PaneConfigurations = Begin PaneConfiguration = 0 NumPanes = 4 Configuration = "(H (1[40] 4[20] 2[20] 3) )" End Begin PaneConfigurati.....2. v103_AssociateInfo MS_DiagramPaneCount 1
Does anyone have and UDF or something that will return the column alias from a view??? I'm trying to create a dynamic report writer (in PHP) and need the alias or column description to present to the user.