Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Find Description of a column of a table
Message
De
08/12/2005 03:19:02
 
 
À
08/12/2005 02:04:17
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2000
Divers
Thread ID:
01076012
Message ID:
01076026
Vues:
24
This message has been marked as a message which has helped to the initial question of the thread.
Hi,
Here is the T-SQL i "captured" using profiler.

*-- Save description
DECLARE @v sql_variant
SET @v = N'qq'
EXECUTE sp_addextendedproperty N'MS_Description', @v, N'user', N'dbo', N'table', N'cimpfmtd', N'column', N'cimpfmt'

*-- Get description and others
select xp.name, cast(xp.[value] as nvarchar(4000)), cast(SQL_VARIANT_PROPERTY(xp.[value], 'BaseType') as nvarchar(256)), cast(SQL_VARIANT_PROPERTY(xp.[value], 'MaxLength') as int), cast(SQL_VARIANT_PROPERTY(xp.[value], 'Precision') as int), cast(SQL_VARIANT_PROPERTY(xp.[value], 'Scale') as int)from ::fn_listextendedproperty(NULL, N'user', N'dbo', N'table', N'cimpfmtd', N'column', N'ccdmap') xp where xp.name in (N'MS_Description', N'MS_Format', N'MS_InputMask', N'MS_NumberOfDecimals', N'MS_AllowBlanks', N'MS_Caption', N'MS_DisplayControl', N'MS_RowSourceType', N'MS_RowSource', N'MS_BoundColumn', N'MS_ColumnCount', N'MS_ColumnHeads', N'MS_ColumnWidths', N'MS_ListRows', N'MS_ListWidth', N'MS_LimitToList')

HTH
I am not the most powerful man in this world.
I am not the worst man in this world either.
I just as same as all of you.
I still need to learn from my mistakes...
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform