Solved

fn_listextendedproperty  - Get column DataType

Posted on 2014-09-09
2
171 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Query group by data in SQL Server - cursor? 3 66
Are triggers slow? 7 25
Need return values from a stored procedure 8 47
Using this function 4 43
This is basically a blog post I wrote recently. I've found that SARGability is poorly understood, and since many people don't read blogs, I figured I'd post it here as an article. SARGable is an adjective in SQL that means that an item can be fou…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

696 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