Solved

fn_listextendedproperty  - Get column DataType

Posted on 2014-09-09
2
161 Views
Last Modified: 2014-09-09
How do you retrieve the column datatype from fn_listextendedproperty?  Or am I using the wrong one?

SELECT     objname, CAST([value] AS varchar(100)) AS name, *
FROM         ::fn_listextendedproperty(NULL, 'user', 'dbo', 'table', 'myTable', 'column', DEFAULT)
0
Comment
Question by:JElster
2 Comments
 
LVL 65

Expert Comment

by:Jim Horn
ID: 40312188
Since data types is not listed in the SSMS treeview, I believe the only way to get is to to look at the function T-SQL, and trace it back to a view or table, and look at it there.
0
 
LVL 69

Accepted Solution

by:
Scott Pletcher earned 500 total points
ID: 40312477
You need to look at sys.columns to get the column data type.  Extended properties will not necessarily contain the current data type.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There have been several questions about Large Transaction Log Files in SQL Server 2008, and how to get rid of them when disk space has become critical. This article will explain how to disable full recovery and implement simple recovery that carries…
Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question