Get ready for BLACK FRIDAY shopping starting in

Forums

ASP

This topic is locked

Problem with Wildcard Variable

Posted 21 Jul 2004 06:46:53
1
has voted
21 Jul 2004 06:46:53 Jay Pena posted:
I need to search a field that is built for searching as 'Keywords'. In this field is text and numeric with commas and dashes and spaces. I want to obviously search keywords from this field for a search page. I have tried so many variations of this syntax its unreal. I can't make it work using *, % or even _. It doesn't work on any field I've tried it on using a VarWChar fomat where the field has a mix of numeric and alpha.

SELECT PB.Keywords, PB.ProductBlockLabel
FROM PB
WHERE "PB.Keywords LIKE '%?%'"

Any help would be greatly appreciated. I'm pulling from an Access DB using MMX.

"Chance favors the prepared mind"

Replies

Replied 07 Aug 2004 12:37:52
07 Aug 2004 12:37:52 Scott Swabey replied:
<font face='Arial'>Try rewriting your sql statement as:

SELECT PB.Keywords, PB.ProductBlockLabel FROM PB WHERE PB.Keywords LIKE "%"

If you have an older version of Access then use * in place of %</font id='Arial'>

Lafinboy Productions
www.lafinboy.com
website development :: website design :: graphic design

Reply to this topic