Geeks With Blogs

My Digital Life in Data Flow Data Warehouse, MDX, Cube, SSIS, BizTalk, SQL, XML, SSAS, SSRS, .NET July 2013 Entries
Quick query to dump table field name and type for data mapping document
SELECT COLUMN_NAME AS [Field Name] , (DATA_TYPE + CASE WHEN CHARACTER_MAXIMUM_LENGTH IS NOT NULL THEN '(' + CONVERT(VARCHAR(20), CHARACTER_MAXIMUM_LENGTH) + ')' ELSE '' END ) AS [Field Type] FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'SOME TABLE NAME'SELECT COLUMN_NAME AS [Field Name] , (DATA_TYPE + CASE WHEN CHARACTER_MAXIMUM_LENGTH IS NOT NULL THEN '(' + CONVERT(VARCHAR(20), CHARACTER_MAXIMUM_LENGTH) + ')' ELSE '' END ) AS [Field Type] FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = ......

Posted On Friday, July 12, 2013 9:38 AM

Feedback allowed rule

I apologize for some feedbacks on my posts that didn't make through.  It's a simple security precaution on my part that if your feedback contains any link, I do not let it through.  If you have a link you want people to know or to check out, post on they can search for it with Google or Bing.

Thank you.

Posted On Friday, July 12, 2013 9:35 AM

Copyright © Kevin Shyr | Powered by: GeeksWithBlogs.net