another search string problem

Results 1 to 2 of 2

Thread: another search string problem

  1. #1
    mvh Guest

    Default another search string problem

    Can the "InStr" function be used on SQL server?<BR>I am able to use it on an access database but getting an error message that reads: the "Instr" function is not recognized etc...<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: another search string problem

    Not that I know of, but there are characters that can probably take care of your current problem. For example, the % character. Let&#039s say I have a variable var1 and I want to grab all records where the characters in var1 are contained within the characters of field1.<BR>SELECT * FROM mytable WHERE field1 LIKE &#039%&#039 + var1 + &#039%&#039<BR>The % is wild and means any number of all characters. So if var1 was &#039AR&#039, I would get records with field1 set to &#039BAR&#039, &#039CAR&#039, &#039ART&#039, &#039DART&#039, etc. Hope that helps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts