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 13506 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:
FierceDeveloper
Is a free weekly email newsletter for the wireless developer community.
Web Application Security — How to Minimize Prevalent Risk of Attacks
Vulnerabilities in web applications are now the largest vector of enterprise security attacks.
100% Free Subscription until Stock lost.View complete list.
Sponsored by