Source language: Translate to:

Wild Card Search

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

Wild Card Search

Postby Carl_SA » Sun Jan 20, 2008 5:03 am

Is there a way to perform a query where instead of leaving the field blank you insert a wildcard expression e.g. "*.*"
Carl_SA
 
Posts: 91
Joined: Sat Dec 17, 2005 12:47 am

Postby Gaev » Sun Jan 20, 2008 6:34 am

Carl_SA:

From the Help file ...
LIKE
The search string is similar to the field contents. The LIKE operator allows you to include wildcards to find partial matches. For example, the following will find all customers having a first name that starts with the letter J:

FirstName LIKE "J%"

The % character is a wildcard. The wildcard can be placed anywhere in the string and you can use as many wildcards as you like.

Here are some examples:

LastName LIKE "%duff%"
will find "Duffy", "Macduff", "Duffel", etc.


Phone LIKE "416%"
will find telephone numbers beginning with 416.


Another wildcard is the underscore character (_) which can be used to represent any single character. For example:

LastName LIKE "sm_th"
will find "Smith", "Smyth", "Smath", "Smeth", etc.


In order to get the equivalent of "*.*", you need to specify "myField LIKE %.%"
User avatar
Gaev
 
Posts: 3717
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby Carl_SA » Sun Jan 20, 2008 11:05 pm

Thanks once again Gaev,

Would this apply to a text field where there are a series of words in the database field?
Carl_SA
 
Posts: 91
Joined: Sat Dec 17, 2005 12:47 am

Postby Gaev » Mon Jan 21, 2008 7:17 am

Carl_SA:
Would this apply to a text field where there are a series of words in the database field?
Yes ... there is no special database field for "file names" ... so it looks at your content like any other text.

Specifying "LIKE %.%" in a regular text field would return a match if the content was something like ...

My name is Carl. I am a fan of NeoBook

... since it found the dot with characters to the left and right of it.
User avatar
Gaev
 
Posts: 3717
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby Carl_SA » Mon Jan 21, 2008 10:33 am

Thanks again Gaev.
Problem sorted
Carl_SA
 
Posts: 91
Joined: Sat Dec 17, 2005 12:47 am


Return to NeoBookDBPro

Who is online

Users browsing this forum: No registered users and 1 guest

cron