AspdotnetCodes.com
Search
Articles
Books
Resources
Asp.Net News
Downloads
Free Tech Magazines
Asp.Net Web Hosting
Archives
Softwares
Newsletter
Suggest Us
Link to Us
Feeds Subscription
Articles
Questions & Answers
Tips & Tricks
 How To: Read Text Field <LongText> data completely from SQL Query Analyzer
Posted by Moderator1 on  9/12/2008 10:18:46 AM 7476 Views
In Microsoft SQL Server, Text field column's data/content cannot be read completely, if the length of the data exceeds certain amount. Even through Enterprise Manager, you can see only as '<Long Text>' . So how to view the entire content. Here's a trick for you.

DECLARE @data VarChar(5000)
SELECT @data = TextFieldColumnName FROM MyTableName WHERE Condition='something'
Print @data

These 3 lines of code, will print the entire content of Text field column completely.

Post New Tips/Tricks View all Tips/Tricks

Featured Resources:
SearchSAP
The Web's best SAP-specific information resource for enterprise IT professionals.
Introduction to Software Development
This 380 page eBook "Introduction to Software Development" is designed for IT specialists and developers that are starting their way in the free software development universe.
100% Free Subscription until Stock lost.View complete list.
Sponsored by