LIKE question w/wildcards

Post Reply
Mr. Bigglesworth
Posts: 56
Joined: Fri Feb 16, 2001 6:54 pm

LIKE question w/wildcards

Post by Mr. Bigglesworth »

I'm not sure if you'd have a definitive answer for this with what I can give you, but even a suggestion would help.

In one of our tables, when you run this query:

tsql "select count(DOCID) indexcnt from tbldoc where (tbldoc.myfield LIKE '(henrick,henrik)')"

you get a count of 1200 hits. However, when you run this variation, with wildcards:

tsql "select count(DOCID) indexcnt from tbldoc where (tbldoc.myfield LIKE '(henrick*,henrik*)')"

you get a count of zero.

Would you happen to know why the wildcard search might return zero hits? Thanks for the help, and if you need more information, please ask.
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

LIKE question w/wildcards

Post by John »

The () syntax is actually for defining inline thesaurus terms, and the * is not special, so it will look for "henrick*" literally with the '*' on the end.
John Turnbull
Thunderstone Software
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

LIKE question w/wildcards

Post by mark »

Perhaps you wanted
sql "select count(DOCID) indexcnt from tbldoc where tbldoc.myfield LIKE 'henrick* henrik* @0'"
Post Reply