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
 Other Forums
 Other Topics
 Searching text field type using like and retrieving textfield

Author  Topic 

graz
Chief SQLTeam Crack Dealer

4149 Posts

Posted - 2000-08-02 : 00:00:00
alecmatias writes "Hi, I'm using SQL 7 and I want to search a string value on a text data type field using the LIKE so I can get all word that has the value. ex.

Select * from articles
where content LIKE '%test' OR content LIKE 'test%' OR
LIKE '%test%

but does not work. I get an error message like this.
The text ntext, and image data types cannot be used in the WHERE, HAVING, or ON clause, except with the LIKE or ISNULL predicates.

How can I query my database using the LIKE?. or please give me some ideas or work arounds if this isn't working. and how can I retrieve the value of a text field?

P.S. I'm using this inside stored procedure."
   

- Advertisement -