Results 1 to 2 of 2

Thread: Searching throug TEXT fields

  1. #1
    Henry Koren Guest

    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%&#39

    However UPPER doesn't work on text fields (I want the search to be case insensitive)

    I tried this:
    where patindex(searchtext, &#39;%SEARCHSTRING%&#39 <> 0

    but that is not case-insensitive...
    Help me SQL gurus, you are my only hope

  2. #2
    Henry Koren Guest

    Searching throug TEXT fields (reply)

    Nevermind

    Patindex does work, I just had the atributes switched.... it&#39;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
  •