Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Long Text" in SQL Server

Status
Not open for further replies.
Jul 29, 2005
136
PT
Hi,

Strange thing happen in the last post :)

I´m trying to read a column value from SQL Server. I nee to see what the text is. However, my recordset always returns "<Long Text>" for that column.

How can I see this kind of text?

Thnak you
 
Long text is returned when you have set your field type to text or ntext in SQL. If you do not need all the space for the text field you can change the field type to a varchar. if you do need the space, you could build a quickie utility program to pull the information into a text box for display. Other than those two options I am not sure how to force SQL/SQL query analyzer to show you the field contents.

Scoty ::)
 
You can use the substring function to display part of the data from the long text field. Sometimes this is enough.
Code:
select substring(bigtext,1,1000) from mytable

Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top