Monday, March 19, 2012

Extended Property

How do I query the extended property of a column (like MS_Description
property). I run the following query and SqlServer returns nothing. But
I see the description in enterprise manager. Am I missing anything here
please?
SELECT *
FROM ::fn_listextendedproperty (N'MS_Description',
N'user', N'dbo', N'table', N'ED_Account', N'column', 'AccountID')Your query looks okay. Can you try the query below,
this should return all column descriptions for your table.
select value,col_name(id, smallid)
from sysproperties
where name='MS_Description'
and id=object_id('dbo.ED_Account')|||Thanks that works
markc...@.hotmail.com wrote:
> Your query looks okay. Can you try the query below,
> this should return all column descriptions for your table.
> select value,col_name(id, smallid)
> from sysproperties
> where name='MS_Description'
> and id=object_id('dbo.ED_Account')|||Note that sysproperties isn't documented and was removed in 2005 (replaced b
y a documented catalog
view). So, I do not recommend that you use it. I have a feeling that Mark su
ggested you the query
just to troubleshoot, verifying that there actually has been defined extende
d properties for this
object (etc.).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"S Chapman" <s_chapman47@.hotmail.co.uk> wrote in message
news:1149091258.427862.291020@.f6g2000cwb.googlegroups.com...
> Thanks that works
> markc...@.hotmail.com wrote:
>

No comments:

Post a Comment