General
Apex SQL Audit
Apex SQL Clean
Apex SQL Code
Apex SQL Diff
Apex SQL Doc
Apex SQL Edit
Apex SQL Enforce
Apex SQL Log
Apex SQL Script
Knowledgebase Home
Apex SQL Audit
Apex SQL Clean
Apex SQL Code
Apex SQL Diff
Apex SQL Doc
Apex SQL Edit
Apex SQL Enforce
Apex SQL Log
Apex SQL Script
Knowledgebase Home
|
ApexSQL Knowledgebase Tips and How-to Articles for Apex SQL Tools How to put descriptions for the tables in ApexSQL Doc This KB discusses how to add descriptions to tables in ApexSQL Doc through the extended property feature. DESCRIPTION To show the extended properties in your database's documentation , ApexSQL Doc allows you to specify a common name for the properties in the ‘Extended Properties’ step of the Project Wizard. As with Enterprise Manager's Table designer or Management Studio, MS_Description is also the default Main Extended Property Name set by ApexSQL Doc when a user adds extended properties. SOLUTION The following example will demonstrate how the Main Extended Property Name value affects the final documentation: Example 1: CREATE TABLE [DBO].[TABLE_EXT_PROPS] ( [FIRST_COL] [INT] NOT NULL, [SECOND_COL] [VARCHAR](50) NULL) GO --First property EXEC SYS.SP_ADDEXTENDEDPROPERTY @name = N'MS_Description' , @value = N'Description for First_col' , @level0type = N'SCHEMA' , @level0name = N'dbo' , @level1type = N'TABLE' , @level1name = N'Table_Ext_Props' , @level2type = N'COLUMN' , @level2name = N'First_col' GO --Second property EXEC SYS.SP_ADDEXTENDEDPROPERTY @name = N'MS_Description' , @value = N'Description for Second_col' , @level0type = N'SCHEMA' , @level0name = N'dbo' , @level1type = N'TABLE' , @level1name = N'Table_Ext_Props' , @level2type = N'COLUMN' , @level2name = N'Second_col' GO Above SQL script displays as below in the documentation: ![]() Example 2: Let’s change the name of the first property to another, for example ‘Caption’: EXEC SYS.SP_UPDATEEXTENDEDPROPERTY @name = N'Caption' , @value = N'Description for First_col' , @level0type = N'SCHEMA' , @level0name = N'dbo' , @level1type = N'TABLE' , @level1name = N'Table_Ext_Props' , @level2type = N'COLUMN' , @level2name = N'First_col' The second property name stays as “MS_Description”. The same goes for our Main Extended Property Name. Below image shows how this affects the documentation: ![]() The first property value is gone from the Description column because the property name was changed. Example 3: Let’s change the value of the Main Extended Property Name to ‘Caption’. This will affect the documentation as below: ![]() The second property disappears because its name remains “MS_Description”. SEE ALSO Options : Extended Properties in Documentation AUTHOR David Dawson LAST REVIEW 29 August 2007 Labels: ApexSQL Doc ...Welcome to the ApexSQL Knowledge Base Welcome to the ApexSQL Training Knowledge Base. Here you'll find tips, reviews, videos, and articles on how to get the most out of ApexSQL Tools and Microsoft SQL Server. Labels: Apex SQL Audit, Apex SQL Edit, Apex SQL Script, ApexSQL Clean, ApexSQL Code, ApexSQL Diff, ApexSQL Doc, ApexSQL Enforce, ApexSQL Law, ApexSQL Log, ApexSQL Report, General ... |
© 2008 Apex SQL Tools All Rights Reserved | 1.919.968.8444 | Contact Us | Terms of Use



