Re: How Do You Get The Description Property?
From: Aaron [SQL Server MVP] (ten.xoc_at_dnartreb.noraa)
Date: 08/06/04
- Next message: Aaron [SQL Server MVP]: "Re: Truncate partially"
- Previous message: Richard Ding: "Re: Sql Server script modification"
- In reply to: John Smith: "Re: How Do You Get The Description Property?"
- Next in thread: Aaron [SQL Server MVP]: "Re: How Do You Get The Description Property?"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 6 Aug 2004 09:59:01 -0400
I'm going to update both #2244 and http://www.aspfaq.com/2177 with this
information shortly.
Note that you should avoid using sysobjects, syscolumns, systypes etc.
directly. These tables aren't always going to exist...
-- http://www.aspfaq.com/ (Reverse address to reply.) "John Smith" <js@no.com> wrote in message news:#XMUBx7eEHA.704@TK2MSFTNGP09.phx.gbl... > Very cool. Thanks. But, how do I tell it to return it for all tables? > Seems you have to specify the table name: > > SELECT name, value FROM ::fn_listextendedproperty > (null, 'user', 'dbo', 'table', 'tableName', 'column', null) > > I've tried replacing tableName with default, null, '*', '%%', '%'...but all > those don't return any values at all. > > Or even better, I plan to add this to another sql statement which uses > sysobjects, syscolumns, and systypes. How can I join it so it looks at the > current table that the sql statement is on? I tried replacing tableName > with sysobjects.name (when inside the other query) but that returns a syntax > error. Example: > > SELECT * > FROM syscolumns INNER JOIN sysobjects ON syscolumns.id = sysobjects.id INNER > JOIN systypes ON syscolumns.xtype = systypes.xtype > LEFT OUTER JOIN ::fn_listextendedproperty > (NULL, 'user', 'dbo', 'table', 'tableName', 'column', default) p > ON p.objName = syscolumns.name > WHERE (sysobjects.xtype = 'U') > > Thanks! > > > > "John Smith" <js@no.com> wrote in message > news:#G2hYI7eEHA.712@TK2MSFTNGP09.phx.gbl... > > Hey folks, > > > > You know that Description field that every column has in Enterprise > Manager? > > Well, how do you get access to it's value through SQL? > > > > I've been looking like mad through all the sys tables and it doesn't > appear > > to be in them...though I could have missed it. > > > > Anyone know where it's stored and/or how to get it through a SQL > statement? > > > > Thanks! > > > > > >
- Next message: Aaron [SQL Server MVP]: "Re: Truncate partially"
- Previous message: Richard Ding: "Re: Sql Server script modification"
- In reply to: John Smith: "Re: How Do You Get The Description Property?"
- Next in thread: Aaron [SQL Server MVP]: "Re: How Do You Get The Description Property?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|