Solved

fn_listextendedproperty  - Get column DataType

Posted on 2014-09-09
2
154 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
Comment Utility
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:
ScottPletcher earned 500 total points
Comment Utility
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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Join & Write a Comment

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 …
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…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now