Popular Articles | Latest Articles | Categories | RSS Feeds



What wildcard character can be used with Advantage

by Site Editor Published 3/5/2006 | Sybase |
 Vote this news:

There are a few options for the wildcard that depend on the implementation.

When using SQL to access tables, the percent (%) character can be used with the LIKE operator.
For example, the following statement will return records with LastNames such as Smith, Smitherson, etc.:

SELECT LastName FROM table1 WHERE LastName LIKE 'Smith%'

When using Xbase filters with the Advantage TDataSet Descendant, the star (*) character can be used.
For example, the following filter will be equivalent to the above statement:

LastName= 'Smith*'

However, when using filters with multiple conditions, the wildcard will be applied to ALL conditions. For example, with the following statement, the wildcard would be applied to both LastName AND FirstName.

LastName = 'Smith*' and FirstName = 'John'

The FTS (Full Text Search) operator CONTAINS, which can be used in either SQL or an Xbase filter, uses the star (*) character as its wildcard symbol. For example, the following Xbase filter will return records where the specified field name contains words such as special, specialty, specialization, etc.:

CONTAINS (, 'special*')

An example SQL statement using a wildcard with the CONTAINS function is:

SELECT * FROM table1 WHERE CONTAINS (, 'special*');

read more



Comments:
no comments submitted


Only members can write comments.Please, login / register to write comment.




Categories

ASP.NET Resources, Reviews

ASP Resources, Reviews

PHP, ASP, .NET, JSP Resources, Reviews


Search

Member login


Free Applications

Latest Articles

Popular Authors

Who's online