Solved

fn_listextendedproperty  - Get column DataType

Posted on 2014-09-09
2
179 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 66

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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Long way back, we had to take help from third party tools in order to encrypt and decrypt data.  Gradually Microsoft understood the need for this feature and started to implement it by building functionality into SQL Server. Finally, with SQL 2008, …
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

724 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