Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Searching for a Hard Return

Author  Topic 

Chiefthawk
Starting Member

3 Posts

Posted - 2007-08-07 : 14:33:00
I am new to the forum. Looks like a great place! I am a bit over novice SQL user.

I am trying to pull hard returns from a text field. I have a patent database that contains title and some have hard returns at the end that need to be corrected. By reading other forums I see that the chars are char(10) and char(13) but when I try to search for these I get an error message:

Server: Msg 306, Level 16, State 1, Line 1
The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.

My search is Text = char(10)

Help!

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-08-07 : 14:37:30
where yourColumn like '%' + char(10) + '%'

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

Chiefthawk
Starting Member

3 Posts

Posted - 2007-08-07 : 15:16:44
Thanks for the quick reply! It worked!
Go to Top of Page
   

- Advertisement -