-
Searching throug TEXT fields
I have been trying to write a query that will allow me to search through text fields. This is a problem because SQL doesn't let me use any functions on TEXT datatypes.
When I was using access I did it like this:
where upper(searchtext) like ('%SEARCHSTRING%'
However UPPER doesn't work on text fields (I want the search to be case insensitive)
I tried this:
where patindex(searchtext, '%SEARCHSTRING%' <> 0
but that is not case-insensitive...
Help me SQL gurus, you are my only hope
-
Searching throug TEXT fields (reply)
Nevermind
Patindex does work, I just had the atributes switched.... it's case insensitive too..
Cool thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|