Trying to list all descriptions for all table columns in a
database with the following syntax:
::fn_listextendedproperty
('MS_Description', 'user', 'dbo', 'TABLE', null, 'COLUMN',
null)
It doesn't work - does anybody know why?
Helne
It doesn't work - does anybody know why?
Helne
Perhaps you would be kind enough to tell us how it doesn't work ... are you
getting a syntax error, a run-time error, incorrect results?
As a start, the function only exists and works in SQL Server 2000. Are you
using SQL Server 2000? Remember that we don't know anything about your
environment, so you need to provide as much relevant information as possible
if you want assistance.
-------------------------------------------
BP Margolin
Please reply only to the newsgroups.
When posting, inclusion of SQL (CREATE TABLE ..., INSERT ..., etc.) which
can be cut and pasted into Query Analyzer is appreciated.
Trying to list all descriptions for all table columns in a
database with the following syntax:
::fn_listextendedproperty
('MS_Description', 'user', 'dbo', 'TABLE', null, 'COLUMN',
null)
It doesn't work - does anybody know why?
Helne
-Keith
=========================
* This posting is provided "AS IS" with no warranties, and confers no rights.
* You assume all risk for your use. ? 2001 Microsoft Corporation. All rights reserved
*
* Please do not send email directly to this alias.
=========================
--------------------
|>Subject: Re: fn_listextendedproperty fails!
|>Date: Fri, 5 Oct 2001 21:58:29 -0400
|>
|>Helne,
|>
|>Perhaps you would be kind enough to tell us how it doesn't work ... are you
|>getting a syntax error, a run-time error, incorrect results?
|>
|>As a start, the function only exists and works in SQL Server 2000. Are you
|>using SQL Server 2000? Remember that we don't know anything about your
|>environment, so you need to provide as much relevant information as possible
|>if you want assistance.
|>
|>-------------------------------------------
|>BP Margolin
|>Please reply only to the newsgroups.
|>When posting, inclusion of SQL (CREATE TABLE ..., INSERT ..., etc.) which
|>can be cut and pasted into Query Analyzer is appreciated.
|>
|>Trying to list all descriptions for all table columns in a
|>database with the following syntax:
|>::fn_listextendedproperty
|>('MS_Description', 'user', 'dbo', 'TABLE', null, 'COLUMN',
|>null)
|>
|>It doesn't work - does anybody know why?
|>
|>Helne
|>
|>
|>
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Perhaps it's worth a moment of your time to recheck the syntax and examples
in the SQL Server 2000 Books Online section "fn_listextendedproperty"
(tsqlref.chm::/ts_fa-fz_7l7t.htm).
The section has a specific example for getting the extended properties for
all columns of a table. Perhaps you should start with that example from BOL,
and apply it to your table.
-------------------------------------------
BP Margolin
Please reply only to the newsgroups.
When posting, inclusion of SQL (CREATE TABLE ..., INSERT ..., etc.) which
can be cut and pasted into Query Analyzer is appreciated.
every column and one on table level. To get the value of this "extendedQuote:> WOW!
> Someone tries to help (TWO people - amazing)!
> Yes, uses SQLServer2000 (Win2K) - fn_listextendedproperties didn't exist
before!
> Look in Enterprise Manager - there is a field called description - one for
registered texts among other things.Quote:> There is a system table called sysproperties where you can find these
and their descriptions!Quote:> This function uses this table (I think)!
> My goal was to get a recordset (NOT .NET yet!) with all tables all columns
Quote:> It is suppose to work according to the book - or?
> Some info missing?
> Helne
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!
Hey!
I've looked at the documentation for this function over and over and over again and tried the examples!
It doesnt work the way I need it to!
Which is: List ALL tables ALL columns extended properties named MS_Description.
(Everything is solvable - just too bad this doesn't work!)
All answers I've got so far is surely well ment but,
if you don't specifically know the answer - you don't need to answer!
I surely won't sent the question into a well-known all-around-the-world newsgroup before trying very hard myself and reading the documentation forwards and backwards (NOT recomended)! I've maby misunderstood it since English is not my native tongue, please tell me so if that's the case!
Thankz!
Helne
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
I know exactly what you are talking about and seem to be having the
same problem. This works for me:
SELECT *
FROM ::fn_listextendedproperty(
'MS_Description',
'user',
'grxApp',
'table',
'AD_SESSION',
'column',
default)
But only gets the specific table. If I try to change 'AD_SESSION' to
NULL or default (as the BOL suggests) it returns nothing.
The BOL also says that:
SELECT * FROM ::fn_listextendedproperty(NULL, NULL, NULL, NULL,
NULL, NULL, NULL)
should return all properties for all objects, but it also returns
nothing for me.
If anyone knows how I can get all column descriptions for all tables,
I also would be greatly appreciative.
Thanks,
Dan
ps. I have seen elsewhere that adox.dll offers this ability, but I
need to get this informaiton via SQL.
Quote:> Hey!
> I've looked at the documentation for this function over and over
> and over again and tried the examples!
> It doesnt work the way I need it to!
> Which is: List ALL tables ALL columns extended properties named
> MS Description.
> (Everything is solvable - just too bad this doesn't work!)
> All answers I've got so far is surely well ment but,
> if you don't specifically know the answer - you don't need to
> answer!
> I surely won't sent the question into a well-known
> all-around-the-world newsgroup before trying very hard myself
> and reading the documentation forwards and backwards (NOT
> recomended)! I've maby misunderstood it since English is not my
> native tongue, please tell me so if that's the case!
> Thankz!
> Hel?e
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!
1. fn_listextendedproperty query
Any clue why this doesn't work?
SELECT
col_info.table_catalog,
col_info.table_name,
col_info.column_name,
col_info.column_default,
col_info.is_nullable,
col_info.data_type,
col_info.character_maximum_length,
col_info.numeric_precision,
col_info.numeric_scale,
(SELECT value FROM ::fn_listextendedproperty
('MS_Description', 'USER', 'DBO', 'table',
col_info.table_name, 'column', col_info.column_name)) AS
col_description
FROM
INFORMATION_SCHEMA.COLUMNS AS col_info
WHERE
col_info.table_name NOT LIKE 'dt%'
AND col_info.table_name NOT LIKE 'sys%'
ORDER BY col_info.table_name, col_info.ordinal_position
Thanks,
John
2. Oracle, Stored Procedures and ADO
4. Bar Codes
5. fn_listextendedproperty - list all columns in all tables
6. Documenting a SQL Server Database
9. List tables extended properties using function fn_listextendedproperty
10. ::fn_listextendedproperty misbehaving
11. SQL - NT failed install - dies with failed login
12. Connection to cube fails using Excel 2000, Brio fails
13. DTS Package call another, when child fails, parent fails