Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Correct syntax for parameter field and wildcards

Status
Not open for further replies.
Mar 4, 2003
47
US
I am searching a table of software titles for a specific title. Currently the search works fine but I have to enter the complete name into the parameter. I would like to be able to enter just part of the title. Example: "Access" instead of "Microsoft Access 2000." I tried using the wildcard symbol "*" but I suspect I'm not using the correct syntax. Here's what I've tried:

{SOFTWARE.ProductName} = *{?AppName}*
{SOFTWARE.ProductName} = *+{?AppName}+*

I'm still pretty new to Crystal so I am probably missing something simple. Thanks in advance for any help you can provide.
 
You're nearly there, Phil.

The correct syntax is:

{SOFTWARE.ProductName} like "*" + {?AppName}+ "*"

Remember to use 'like' rather than '=' when using wildcards, otherwise you'll look for the literal wildcard identifiers as part of your database string.

Also remember 'like' doesn't pay any attention to indices, so don't expect superb performance.

Naith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top