Efficiency



I wrote a script that built the SQL to examine text fields using a LIKE
operator,

text LIKE '*searchtext*'

but for some reason or other I couldn't get it to work. I instead
decided to test for inclusion by using

InStr(1, text, searchtext) > 0

which works, but the code runs a whole lot slower than I'd like it to.
The question is how much less efficient is evaluating the InStr
function and then doing a comparison versus simply using a LIKE
operator (i.e. would it be worth it for me to spend the time to make
the latter work)?

.



Relevant Pages

  • XP_cmdShell Error
    ... I am trying to below script on BOX1 ... But it is Blowing with below error. ... Reason: Not associated ... with a trusted SQL ...
    (microsoft.public.sqlserver.server)
  • Loging Script
    ... It seems there is something wrong with my script for the reason that ... it always returns, UserName NOT found. ... $sql = check; ...
    (comp.lang.php)
  • Re: Pagination II
    ... the categories have enough entries to fill multiple pages. ... script runs and always goes to page 2 for some reason. ... Start with your SQL, once it's correct, then print it ...
    (comp.lang.perl.misc)
  • Re: Pagination II
    ... script runs and always goes to page 2 for some reason. ... Can anyone spot the problem? ... print $sql; ...
    (comp.lang.perl.misc)
  • RE: Backups have Shadow Copy Problems
    ... Active backup destination: File ... Reason: The process cannot access the file because it is being used by ... Warning: Unable to open "C:\Documents and Settings\Administrator\Local ... Warning: Unable to open "C:\Program Files\Microsoft SQL ...
    (microsoft.public.windows.server.sbs)